Skip to content

Commit

Permalink
refactor: replace parcel with tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
markandrus committed Jul 13, 2023
1 parent 3ac0eef commit 882fae7
Show file tree
Hide file tree
Showing 19 changed files with 106 additions and 1,518 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
"devDependencies": {
"@babel/core": "^7.20.5",
"@emotion/css": "^11.10.6",
"@parcel/packager-ts": "^2.8.2",
"@parcel/transformer-typescript-types": "^2.8.2",
"@propeldata/release": "workspace:^",
"@types/css-modules": "^1.0.2",
"@types/eslint": "^7.28.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/core/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
"module": "dist/index.module.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "parcel watch",
"build": "parcel build"
"build": "tsc"
},
"publishConfig": {
"access": "public",
"group": "@propeldata/ui-kit"
},
"devDependencies": {
"parcel": "^2.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.3"
Expand Down
9 changes: 9 additions & 0 deletions packages/core/components/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/__test__/**/*", "src/**/*.test.*"]
}
7 changes: 5 additions & 2 deletions packages/core/graphql/codegen.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
overwrite: true
legacyMode: true
config:
fetcher: graphql-request
generates:
src/generated/index.ts:
schema: public.graphql
documents:
- ./**/*.graphql
plugins:
- add
- typescript
- typescript-operations
- typescript-react-query
config:
content:
- // @ts-nocheck
fetcher: graphql-request
5 changes: 2 additions & 3 deletions packages/core/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"module": "dist/index.module.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "yarn gen && parcel watch",
"build": "yarn gen && parcel build",
"build": "yarn gen && tsc",
"gen": "graphql-codegen --config codegen.yml && node script.cjs src/generated/index.ts"
},
"publishConfig": {
Expand All @@ -27,11 +26,11 @@
"react-dom": "^16.8 || ^17 || ^18"
},
"devDependencies": {
"@graphql-codegen/add": "^4.0.0",
"@graphql-codegen/cli": "^4.0.1",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/typescript-react-query": "^4.1.0",
"parcel": "^2.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.4"
Expand Down
9 changes: 9 additions & 0 deletions packages/core/graphql/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/__test__/**/*", "src/**/*.test.*"]
}
4 changes: 1 addition & 3 deletions packages/core/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"module": "dist/index.module.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "parcel watch",
"build": "parcel build"
"build": "tsc"
},
"files": [
"dist",
Expand All @@ -20,7 +19,6 @@
},
"devDependencies": {
"chart.js": "^4.2.1",
"parcel": "^2.8.2",
"typescript": "^4.9.4"
},
"peerDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions packages/core/plugins/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/__test__/**/*", "src/**/*.test.*"]
}
1 change: 1 addition & 0 deletions packages/react/counter/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/** @type {import('jest').Config} */
const config = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
modulePathIgnorePatterns: ['dist'],
rootDir: '.',
roots: ['<rootDir>'],
moduleNameMapper: {
Expand Down
4 changes: 1 addition & 3 deletions packages/react/counter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"module": "dist/index.module.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "parcel watch",
"build": "parcel build",
"build": "tsc",
"test": "jest",
"test:coverage": "jest --ci --coverage --json --outputFile=coverage/coverage.json"
},
Expand Down Expand Up @@ -37,7 +36,6 @@
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"msw": "^1.2.2",
"parcel": "^2.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.3"
Expand Down
20 changes: 5 additions & 15 deletions packages/react/counter/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
"target": "es2016",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@/testing/*": ["testing/*"],
"@/testing": ["testing"],
"@/counter": ["src"]
}
"rootDir": "src",
"outDir": "dist"
},
"include": ["**/*.ts", "**/*.tsx", "./jest.config.js", "./jest.setup.js"],
"exclude": ["node_modules"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/__test__/**/*", "src/**/*.test.*"]
}
1 change: 1 addition & 0 deletions packages/react/leaderboard/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/** @type {import('jest').Config} */
const config = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
modulePathIgnorePatterns: ['dist'],
rootDir: '.',
roots: ['<rootDir>'],
moduleNameMapper: {
Expand Down
4 changes: 1 addition & 3 deletions packages/react/leaderboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"module": "dist/index.module.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "parcel watch",
"build": "parcel build",
"build": "tsc",
"test": "jest",
"test:coverage": "jest --ci --coverage --json --outputFile=coverage/coverage.json"
},
Expand Down Expand Up @@ -40,7 +39,6 @@
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^27.5.1",
"msw": "^1.2.2",
"parcel": "^2.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.3"
Expand Down
20 changes: 5 additions & 15 deletions packages/react/leaderboard/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
"target": "es2016",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@/testing/*": ["testing/*"],
"@/testing": ["testing"],
"@/leaderboard": ["src"]
}
"rootDir": "src",
"outDir": "dist"
},
"include": ["**/*.ts", "**/*.tsx", "./jest.config.js", "./jest.setup.js"],
"exclude": ["node_modules"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/__test__/**/*", "src/**/*.test.*"]
}
1 change: 1 addition & 0 deletions packages/react/time-series/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/** @type {import('jest').Config} */
const config = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
modulePathIgnorePatterns: ['dist'],
rootDir: '.',
roots: ['<rootDir>'],
moduleNameMapper: {
Expand Down
4 changes: 1 addition & 3 deletions packages/react/time-series/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"module": "dist/index.module.js",
"types": "dist/index.d.ts",
"scripts": {
"dev": "parcel watch",
"build": "parcel build",
"build": "tsc",
"test": "jest",
"test:coverage": "jest --ci --coverage --json --outputFile=coverage/coverage.json"
},
Expand Down Expand Up @@ -42,7 +41,6 @@
"jest-canvas-mock": "^2.5.2",
"jest-environment-jsdom": "^27.5.1",
"msw": "^1.2.2",
"parcel": "^2.8.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^4.9.3"
Expand Down
20 changes: 5 additions & 15 deletions packages/react/time-series/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"jsx": "preserve",
"target": "es2016",
"moduleResolution": "node",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"paths": {
"@/testing/*": ["testing/*"],
"@/testing": ["testing"],
"@/time-series": ["src"]
}
"rootDir": "src",
"outDir": "dist"
},
"include": ["**/*.ts", "**/*.tsx", "./jest.config.js", "./jest.setup.js"],
"exclude": ["node_modules"]
"include": ["src/**/*.ts", "src/**/*.tsx"],
"exclude": ["src/**/__test__/**/*", "src/**/*.test.*"]
}
38 changes: 11 additions & 27 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,18 @@
{
"include": ["packages", "types", "scripts", "app/storybook"],
"exclude": ["node_modules", "actions"],
"compilerOptions": {
"baseUrl": ".",
"target": "ES2018",
"moduleResolution": "node",
"lib": ["dom", "dom.iterable", "esnext"],
"declaration": true,
"types": ["node", "css-modules"],
"typeRoots": ["./node_modules/@types", "./types"],
"noEmit": true,
"strict": true,
"alwaysStrict": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"strictPropertyInitialization": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": false,
"jsx": "react",
"allowJs": false,
"pretty": true,
"allowSyntheticDefaultImports": true,
"emitDecoratorMetadata": false,
"lib": ["DOM"],
"esModuleInterop": true,
"experimentalDecorators": false,
"importHelpers": true,
"skipLibCheck": true,
"moduleResolution": "node",
"target": "ES2021",
"declaration": true,
"experimentalDecorators": true,
"inlineSourceMap": true,
"inlineSources": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"resolveJsonModule": true,
"sourceMap": true,
"isolatedModules": true,
"stripInternal": true
"stripInternal": true,
"skipLibCheck": true
}
}
Loading

0 comments on commit 882fae7

Please sign in to comment.