@graphcommerce/cli 8.0.7 → 8.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @graphcommerce/cli
2
2
 
3
+ ## 8.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2382](https://github.com/graphcommerce-org/graphcommerce/pull/2382) [`3cdf3a6`](https://github.com/graphcommerce-org/graphcommerce/commit/3cdf3a60cf2a95aadc0c4ef782edbe5ebb77818d) - Solve TypeError: url?.startsWith is not a function ([@paales](https://github.com/paales))
8
+
3
9
  ## 8.0.7
4
10
 
5
11
  ## 8.0.6
package/dist/bin/mesh.js CHANGED
@@ -13,6 +13,7 @@ const next_config_1 = require("@graphcommerce/next-config");
13
13
  const cli_1 = require("@graphql-mesh/cli");
14
14
  const utils_1 = require("@graphql-mesh/utils");
15
15
  const dotenv_1 = __importDefault(require("dotenv"));
16
+ const replace_in_file_1 = require("replace-in-file");
16
17
  const yaml_1 = __importDefault(require("yaml"));
17
18
  const findConfig_1 = require("../utils/findConfig");
18
19
  dotenv_1.default.config();
@@ -92,6 +93,11 @@ const main = async () => {
92
93
  // Reexport the mesh to is can be used by packages
93
94
  await node_fs_1.promises.writeFile(`${meshDir}/.mesh.ts`, `export * from '${relativePath.split(node_path_1.default.sep).join('/')}.mesh'`, { encoding: 'utf8' });
94
95
  await (0, cli_1.graphqlMesh)({ ...cliParams, configName: tmpMesh });
96
+ const result = await (0, replace_in_file_1.replaceInFile)({
97
+ files: node_path_1.default.join(root, '.mesh', 'index.ts'),
98
+ from: "require('node:url').pathToFileURL(__filename)",
99
+ to: 'import.meta.url',
100
+ });
95
101
  await cleanup();
96
102
  };
97
103
  process.on('SIGINT', cleanup);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/cli",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "8.0.7",
5
+ "version": "8.0.8",
6
6
  "scripts": {
7
7
  "dev": "tsc --preserveWatchOutput --watch",
8
8
  "build": "tsc",
@@ -34,15 +34,16 @@
34
34
  "detect-package-manager": "^3.0.1",
35
35
  "graphql-codegen-typescript-validation-schema": "^0.12.1",
36
36
  "graphql-tag": "^2.12.6",
37
+ "replace-in-file": "^7",
37
38
  "rimraf": "^5.0.5",
38
39
  "tslib": "^2.6.2"
39
40
  },
40
41
  "peerDependencies": {
41
- "@graphcommerce/eslint-config-pwa": "^8.0.7",
42
- "@graphcommerce/hygraph-cli": "^8.0.7",
43
- "@graphcommerce/next-config": "^8.0.7",
44
- "@graphcommerce/prettier-config-pwa": "^8.0.7",
45
- "@graphcommerce/typescript-config-pwa": "^8.0.7",
42
+ "@graphcommerce/eslint-config-pwa": "^8.0.8",
43
+ "@graphcommerce/hygraph-cli": "^8.0.8",
44
+ "@graphcommerce/next-config": "^8.0.8",
45
+ "@graphcommerce/prettier-config-pwa": "^8.0.8",
46
+ "@graphcommerce/typescript-config-pwa": "^8.0.8",
46
47
  "graphql": "^16.7.1",
47
48
  "react": "^18.2.0"
48
49
  },
package/src/bin/mesh.ts CHANGED
@@ -4,7 +4,6 @@ import { promises as fs } from 'node:fs'
4
4
  import path from 'node:path'
5
5
  import { exit } from 'node:process'
6
6
  import {
7
- isMonorepo,
8
7
  loadConfig,
9
8
  packageRoots,
10
9
  replaceConfigInString,
@@ -14,6 +13,7 @@ import { graphqlMesh, DEFAULT_CLI_PARAMS, GraphQLMeshCLIParams } from '@graphql-
14
13
  import { Logger, YamlConfig } from '@graphql-mesh/types'
15
14
  import { DefaultLogger } from '@graphql-mesh/utils'
16
15
  import dotenv from 'dotenv'
16
+ import { replaceInFile } from 'replace-in-file'
17
17
  import yaml from 'yaml'
18
18
  import { findConfig } from '../utils/findConfig'
19
19
 
@@ -111,6 +111,12 @@ const main = async () => {
111
111
 
112
112
  await graphqlMesh({ ...cliParams, configName: tmpMesh })
113
113
 
114
+ const result = await replaceInFile({
115
+ files: path.join(root, '.mesh', 'index.ts'),
116
+ from: "require('node:url').pathToFileURL(__filename)",
117
+ to: 'import.meta.url',
118
+ })
119
+
114
120
  await cleanup()
115
121
  }
116
122