Skip to content

Commit

Permalink
ESM Support
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Jun 8, 2021
1 parent 67cf150 commit ce919f3
Show file tree
Hide file tree
Showing 47 changed files with 410 additions and 112 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"predeploy:website": "yarn build:api-docs",
"deploy:website": "cd website && yarn deploy",
"ts:transpile": "concurrently \"tsc --project tsconfig.build.json\" \"tsc --project tsconfig.build.es5.json\"",
"clean-dist": "rimraf \"packages/**/dist\" && rimraf \"packages/**/dist-es5\" && rimraf \".bob\"",
"build": "yarn ts:transpile && bob build",
"build:api-docs": "node scripts/build-api-docs.js",
"lint": "eslint --ext .ts .",
Expand Down Expand Up @@ -41,7 +42,7 @@
"graphql": "^14.0.0 || ^15.0.0"
},
"devDependencies": {
"@ardatan/bob-the-bundler": "1.2.2",
"@ardatan/bob-the-bundler": "1.2.5",
"@babel/core": "7.14.3",
"@babel/plugin-proposal-class-properties": "7.13.0",
"@babel/preset-env": "7.14.4",
Expand Down
18 changes: 14 additions & 4 deletions packages/batch-delegate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand All @@ -23,13 +33,13 @@
},
"dependencies": {
"@graphql-tools/delegate": "^7.1.4",
"@graphql-tools/utils": "^7.8.1",
"dataloader": "2.0.0",
"tslib": "~2.2.0"
},
"devDependencies": {
"@graphql-tools/schema": "^7.1.4",
"@graphql-tools/stitch": "^7.5.2",
"@graphql-tools/utils": "^7.8.1"
"@graphql-tools/stitch": "^7.5.2"
},
"publishConfig": {
"access": "public",
Expand Down
14 changes: 12 additions & 2 deletions packages/batch-execute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/delegate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/graphql-tag-pluck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
"directory": "packages/graphql-tag-pluck"
},
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/graphql-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@
},
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/load-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
1 change: 1 addition & 0 deletions packages/load-files/tests/file-scanner.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { loadFilesSync, loadFiles, LoadFilesOptions } from '@graphql-tools/load-files';
import { print } from 'graphql';
import { join } from 'path';
import {jest} from '@jest/globals';

const syncAndAsync = Object.entries({ 'SYNC': loadFilesSync, 'ASYNC': loadFiles });

Expand Down
14 changes: 12 additions & 2 deletions packages/load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/apollo-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/code-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/graphql-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/json-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
14 changes: 12 additions & 2 deletions packages/loaders/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,18 @@
"author": "Dotan Simha <dotansimha@gmail.com>",
"license": "MIT",
"sideEffects": false,
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./*": {
"require": "./dist/*.js",
"import": "./dist/*.mjs"
}
},
"typings": "dist/index.d.ts",
"typescript": {
"definition": "dist/index.d.ts"
Expand Down
Loading

0 comments on commit ce919f3

Please sign in to comment.