Skip to content

Commit

Permalink
build(pkg): add "type": "module"
Browse files Browse the repository at this point in the history
Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Aug 28, 2022
1 parent 29883e1 commit 9f53632
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 5 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"icon": "eslint"
},
{
"extensions": [".graphqlrc.ts"],
"extensions": [".graphqlrc.cts"],
"format": "svg",
"icon": "graphql"
},
Expand Down
56 changes: 56 additions & 0 deletions .yarn/patches/graphql-config-npm-4.3.5-8989a92a82.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
diff --git a/cjs/helpers/cosmiconfig.js b/cjs/helpers/cosmiconfig.js
index bb8b01763792e325e214b90af229da718cc2de07..ffe11ce0d2a05488805499be029a50ce4af8d773 100644
--- a/cjs/helpers/cosmiconfig.js
+++ b/cjs/helpers/cosmiconfig.js
@@ -42,6 +42,7 @@ function prepareCosmiconfig(moduleName, _a) {
'#.config.ts',
'#.config.js',
'#.config.cjs',
+ '#.config.cts',
'#.config.json',
'#.config.yaml',
'#.config.yml',
@@ -50,6 +51,7 @@ function prepareCosmiconfig(moduleName, _a) {
'.#rc.ts',
'.#rc.js',
'.#rc.cjs',
+ '.#rc.cts',
'.#rc.json',
'.#rc.yml',
'.#rc.yaml',
@@ -64,6 +66,7 @@ function prepareCosmiconfig(moduleName, _a) {
return {
searchPlaces: searchPlaces.map(function (place) { return place.replace('#', moduleName); }),
loaders: {
+ '.cts': (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)(),
'.ts': (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)(),
'.js': cosmiconfig_1.defaultLoaders['.js'],
'.json': loadJson,
diff --git a/esm/helpers/cosmiconfig.js b/esm/helpers/cosmiconfig.js
index a656d4c5f8ecccada2f53f5b87c47cd9551e0ac6..7dff32dcc653d58fa20ad88da78ff12a0d608b70 100644
--- a/esm/helpers/cosmiconfig.js
+++ b/esm/helpers/cosmiconfig.js
@@ -36,6 +36,7 @@ function prepareCosmiconfig(moduleName, _a) {
'#.config.ts',
'#.config.js',
'#.config.cjs',
+ '#.config.cts',
'#.config.json',
'#.config.yaml',
'#.config.yml',
@@ -44,6 +45,7 @@ function prepareCosmiconfig(moduleName, _a) {
'.#rc.ts',
'.#rc.js',
'.#rc.cjs',
+ '.#rc.cts',
'.#rc.json',
'.#rc.yml',
'.#rc.yaml',
@@ -58,6 +60,7 @@ function prepareCosmiconfig(moduleName, _a) {
return {
searchPlaces: searchPlaces.map(function (place) { return place.replace('#', moduleName); }),
loaders: {
+ '.cts': TypeScriptLoader(),
'.ts': TypeScriptLoader(),
'.js': defaultLoaders['.js'],
'.json': loadJson,
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"access": "public",
"directory": "./"
},
"type": "module",
"files": [
"dist",
"src"
Expand Down Expand Up @@ -126,7 +127,7 @@
"eslint-plugin-unicorn": "43.0.2",
"eslint-plugin-yml": "1.1.0",
"graphql": "16.6.0",
"graphql-config": "4.3.5",
"graphql-config": "patch:graphql-config@npm%3A4.3.5#~/.yarn/patches/graphql-config-npm-4.3.5-8989a92a82.patch",
"growl": "1.10.5",
"husky": "8.0.1",
"is-ci": "3.0.1",
Expand All @@ -153,7 +154,8 @@
},
"resolutions": {
"@ardatan/sync-fetch": "larsgw/sync-fetch#head=worker_threads",
"mkdist": "patch:mkdist@npm:0.3.13#.yarn/patches/mkdist-npm-0.3.13-c41cf41c68.patch"
"mkdist": "patch:mkdist@npm:0.3.13#.yarn/patches/mkdist-npm-0.3.13-c41cf41c68.patch",
"graphql-config": "patch:graphql-config@npm%3A4.3.5#~/.yarn/patches/graphql-config-npm-4.3.5-8989a92a82.patch"
},
"engines": {
"node": ">=14.16",
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
"**/**/*.mjs",
"**/**/*.ts",
"**/**/.*.cjs",
"**/**/.*.cts",
"**/**/.*.ts"
],
// SEE: https://typestrong.org/ts-node/docs/configuration
Expand Down
27 changes: 25 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ __metadata:
eslint-plugin-unicorn: "npm:43.0.2"
eslint-plugin-yml: "npm:1.1.0"
graphql: "npm:16.6.0"
graphql-config: "npm:4.3.5"
graphql-config: "patch:graphql-config@npm%3A4.3.5#~/.yarn/patches/graphql-config-npm-4.3.5-8989a92a82.patch"
growl: "npm:1.10.5"
husky: "npm:8.0.1"
is-ci: "npm:3.0.1"
Expand Down Expand Up @@ -5068,7 +5068,7 @@ __metadata:
languageName: node
linkType: hard

"graphql-config@npm:4.3.5, graphql-config@npm:^4.3.0":
"graphql-config@npm:4.3.5":
version: 4.3.5
resolution: "graphql-config@npm:4.3.5"
dependencies:
Expand All @@ -5091,6 +5091,29 @@ __metadata:
languageName: node
linkType: hard

"graphql-config@patch:graphql-config@npm%3A4.3.5#~/.yarn/patches/graphql-config-npm-4.3.5-8989a92a82.patch":
version: 4.3.5
resolution: "graphql-config@patch:graphql-config@npm%3A4.3.5#~/.yarn/patches/graphql-config-npm-4.3.5-8989a92a82.patch::version=4.3.5&hash=52aeb2"
dependencies:
"@graphql-tools/graphql-file-loader": "npm:^7.3.7"
"@graphql-tools/json-file-loader": "npm:^7.3.7"
"@graphql-tools/load": "npm:^7.5.5"
"@graphql-tools/merge": "npm:^8.2.6"
"@graphql-tools/url-loader": "npm:^7.9.7"
"@graphql-tools/utils": "npm:^8.6.5"
cosmiconfig: "npm:7.0.1"
cosmiconfig-toml-loader: "npm:1.0.0"
cosmiconfig-typescript-loader: "npm:^4.0.0"
minimatch: "npm:4.2.1"
string-env-interpolation: "npm:1.0.1"
ts-node: "npm:^10.8.1"
tslib: "npm:^2.4.0"
peerDependencies:
graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0
checksum: e0d72ec3217043911414142c5f1946cc7c7866e71e1561cb95187cd8f506c97024f0e45b2250e6846a7b505e351e6b52d5263afe796aea677b3eaf740b1af62b
languageName: node
linkType: hard

"graphql-depth-limit@npm:^1.1.0":
version: 1.1.0
resolution: "graphql-depth-limit@npm:1.1.0"
Expand Down

0 comments on commit 9f53632

Please sign in to comment.