Skip to content

Commit

Permalink
Update build process to use swc
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Apr 6, 2022
1 parent 470afb6 commit 6279235
Show file tree
Hide file tree
Showing 105 changed files with 2,553 additions and 2,593 deletions.
33 changes: 33 additions & 0 deletions .changeset/tasty-squids-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
'@pothos-examples/envelope-helix-fastify': minor
'@pothos-examples/simple-interfaces': minor
'@pothos-examples/helix': minor
'@pothos-examples/nextjs': minor
'@pothos-examples/prisma': minor
'@pothos-examples/prisma-relay': minor
'@pothos-examples/relay-windowed-pagination': minor
'@pothos-examples/simple-classes': minor
'@pothos/converter': minor
'@pothos/core': minor
'@pothos/deno': minor
'@pothos/plugin-authz': minor
'@pothos/plugin-complexity': minor
'@pothos/plugin-dataloader': minor
'@pothos/plugin-directives': minor
'@pothos/plugin-errors': minor
'@pothos/plugin-example': minor
'@pothos/plugin-federation': minor
'@pothos/plugin-mocks': minor
'@pothos/plugin-prisma': minor
'@pothos/plugin-relay': minor
'@pothos/plugin-scope-auth': minor
'@pothos/plugin-simple-objects': minor
'@pothos/plugin-smart-subscriptions': minor
'@pothos/plugin-sub-graph': minor
'@pothos/plugin-validation': minor
'@pothos/plugin-with-input': minor
'@pothos/test-utils': minor
'@pothos/website': minor
---

Update build process to use swc and move type definitions to dts directory
2 changes: 1 addition & 1 deletion .config/beemo/prettier.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PrettierConfig } from '@beemo/driver-prettier';

const config: PrettierConfig = {
ignore: ['deno'],
ignore: ['deno/src'],
useTabs: false,
tabWidth: 2,
};
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ logs/
coverage/
dist/
lib/
dts/
node_modules/
tmp/
.docz/
Expand Down
10 changes: 10 additions & 0 deletions .swcrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"jsc": {
"parser": {
"syntax": "typescript"
},
"target": "es2020"
},
"sourceMaps": true,
"inlineSourcesContent": false
}
11 changes: 5 additions & 6 deletions examples/envelope-helix-fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"dependencies": {
"@envelop/core": "^2.0.0",
"@faker-js/faker": "^6.0.0-alpha.7",
"@envelop/core": "^2.3.0",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"fastify": "^3.27.2",
"fastify": "^3.28.0",
"graphql": "16.3.0",
"graphql-helix": "^1.11.0",
"ts-node": "^10.6.0"
"graphql-helix": "^1.11.0"
},
"publishConfig": {
"access": "public"
Expand Down
11 changes: 5 additions & 6 deletions examples/graphql-shield/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@graphql-yoga/node": "2.0.0",
"@pothos/core": "workspace:*",
"@graphql-yoga/node": "0.0.1-beta.2",
"graphql": "16.3.0",
"graphql-middleware": "^6.1.18",
"graphql-shield": "^7.5.0",
"ts-node": "^10.6.0"
"graphql-middleware": "^6.1.21",
"graphql-shield": "^7.5.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql-shield/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { schema } from './schema';

const PORT = 3000;

export const server = createServer<Context, unknown>({
export const server = createServer<Context>({
port: PORT,
schema,
context: (ctx) => ({
Expand Down
4 changes: 2 additions & 2 deletions examples/helix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"graphql": "16.3.0",
"graphql-helix": "^1.11.0"
Expand Down
27 changes: 13 additions & 14 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,27 @@
"dependencies": {
"@apollo/client": "^3.5.10",
"@boost/module": "^3.1.0",
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"graphql": "16.3.0",
"graphql-helix": "^1.11.0",
"graphql-tag": "^2.12.6",
"next": "12.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-query": "^3.34.16"
"next": "12.1.4",
"react": "18.0.0",
"react-dom": "18.0.0",
"react-query": "^3.34.19"
},
"devDependencies": {
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/near-operation-file-preset": "^2.2.6",
"@graphql-codegen/near-operation-file-preset": "^2.2.9",
"@graphql-codegen/schema-ast": "^2.4.1",
"@graphql-codegen/typescript": "^2.4.5",
"@graphql-codegen/typescript-operations": "^2.3.2",
"@graphql-codegen/typescript-react-apollo": "^3.2.8",
"@types/node": "17.0.21",
"@types/react": "17.0.39",
"concurrently": "^7.0.0",
"ts-node": "^10.6.0"
},
"@graphql-codegen/typescript": "^2.4.8",
"@graphql-codegen/typescript-operations": "^2.3.5",
"@graphql-codegen/typescript-react-apollo": "^3.2.11",
"@types/node": "17.0.23",
"@types/react": "17.0.43",
"concurrently": "^7.1.0"
},
"engines": {
"node": ">=12.0.0"
}
Expand Down
20 changes: 9 additions & 11 deletions examples/prisma-federation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,27 @@
"scripts": {
"generate": "prisma generate",
"seed": "prisma migrate reset -f",
"ts-node": "ts-node --compiler-options \"{\\\"module\\\":\\\"commonjs\\\"}\"",
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"prisma": {
"seed": "pnpm ts-node prisma/seed.ts"
"seed": "node -r @swc-node/register prisma/seed.ts"
},
"dependencies": {
"@apollo/gateway": "2.0.0-preview.2",
"@apollo/subgraph": "2.0.0-preview.2",
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"@pothos/plugin-directives": "workspace:*",
"@pothos/plugin-federation": "workspace:*",
"@pothos/plugin-relay": "workspace:*",
"@pothos/plugin-prisma": "workspace:*",
"@prisma/client": "^3.10.0",
"apollo-server": "^3.6.3",
"apollo-server-core": "^3.6.3",
"@pothos/plugin-relay": "workspace:*",
"@prisma/client": "^3.12.0",
"apollo-server": "^3.6.7",
"apollo-server-core": "^3.6.7",
"graphql": "16.3.0",
"prisma": "^3.10.0",
"ts-node": "^10.6.0"
},
"prisma": "^3.12.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
16 changes: 7 additions & 9 deletions examples/prisma-relay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,22 @@
"scripts": {
"generate": "prisma generate",
"seed": "prisma migrate reset -f",
"ts-node": "ts-node --compiler-options \"{\\\"module\\\":\\\"commonjs\\\"}\"",
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"prisma": {
"seed": "pnpm ts-node prisma/seed.ts"
"seed": "node -r @swc-node/register prisma/seed.ts"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "^3.4.0",
"@pothos/plugin-prisma": "workspace:*",
"@pothos/plugin-relay": "workspace:*",
"@prisma/client": "^3.10.0",
"apollo-server": "^3.6.3",
"@prisma/client": "^3.12.0",
"apollo-server": "^3.6.7",
"graphql": "16.3.0",
"prisma": "^3.10.0",
"ts-node": "^10.6.0"
},
"prisma": "^3.12.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
16 changes: 7 additions & 9 deletions examples/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@
"scripts": {
"generate": "prisma generate",
"seed": "prisma migrate reset -f",
"ts-node": "ts-node --compiler-options \"{\\\"module\\\":\\\"commonjs\\\"}\"",
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"prisma": {
"seed": "pnpm ts-node prisma/seed.ts"
"seed": "node -r @swc-node/register prisma/seed.ts"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"@pothos/plugin-prisma": "workspace:*",
"@prisma/client": "^3.10.0",
"apollo-server": "^3.6.3",
"@prisma/client": "^3.12.0",
"apollo-server": "^3.6.7",
"graphql": "16.3.0",
"prisma": "^3.10.0",
"ts-node": "^10.6.0"
},
"prisma": "^3.12.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
14 changes: 6 additions & 8 deletions examples/relay-windowed-pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"ts-node": "ts-node --compiler-options \"{\\\"module\\\":\\\"commonjs\\\"}\"",
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"prisma": {
"seed": "pnpm ts-node prisma/seed.ts"
"seed": "node -r @swc-node/register prisma/seed.ts"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@graphql-yoga/node": "0.0.1-beta.2",
"@faker-js/faker": "^6.1.2",
"@graphql-yoga/node": "2.0.0",
"@pothos/core": "workspace:*",
"@pothos/plugin-relay": "workspace:*",
"graphql": "16.3.0",
"prisma": "^3.10.0",
"ts-node": "^10.6.0"
},
"prisma": "^3.12.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
11 changes: 5 additions & 6 deletions examples/simple-classes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"apollo-server": "^3.6.3",
"graphql": "16.3.0",
"ts-node": "^10.6.0"
},
"apollo-server": "^3.6.7",
"graphql": "16.3.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
11 changes: 5 additions & 6 deletions examples/simple-interfaces/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"start": "ts-node --transpile-only src/server.ts",
"start": "node -r @swc-node/register src/server.ts",
"type": "tsc --noEmit"
},
"dependencies": {
"@faker-js/faker": "^6.0.0-alpha.7",
"@faker-js/faker": "^6.1.2",
"@pothos/core": "workspace:*",
"apollo-server": "^3.6.3",
"graphql": "16.3.0",
"ts-node": "^10.6.0"
},
"apollo-server": "^3.6.7",
"graphql": "16.3.0"
},
"publishConfig": {
"access": "public"
}
Expand Down
Loading

0 comments on commit 6279235

Please sign in to comment.