@graphql-codegen/cli 2.6.3-alpha-af9e4731c.0 → 2.6.3
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/bin.js +2 -1
- package/index.js +2 -1
- package/index.mjs +2 -1
- package/package.json +2 -2
package/bin.js
CHANGED
|
@@ -61,7 +61,6 @@ const debounce = _interopDefault(require('debounce'));
|
|
|
61
61
|
const mkdirp = _interopDefault(require('mkdirp'));
|
|
62
62
|
const inquirer = _interopDefault(require('inquirer'));
|
|
63
63
|
const detectIndent = _interopDefault(require('detect-indent'));
|
|
64
|
-
const getLatestVersion = _interopDefault(require('latest-version'));
|
|
65
64
|
|
|
66
65
|
let logger;
|
|
67
66
|
function getLogger() {
|
|
@@ -1423,6 +1422,8 @@ async function writeConfig(answers, config) {
|
|
|
1423
1422
|
}
|
|
1424
1423
|
// Updates package.json (script and plugins as dependencies)
|
|
1425
1424
|
async function writePackage(answers, configLocation) {
|
|
1425
|
+
// dynamic import because latest-version is pure ESM
|
|
1426
|
+
const getLatestVersion = (await new Promise(function (resolve) { resolve(_interopNamespace(require('latest-version'))); })).default;
|
|
1426
1427
|
// script
|
|
1427
1428
|
const pkgPath = path.resolve(process.cwd(), 'package.json');
|
|
1428
1429
|
const pkgContent = fs.readFileSync(pkgPath, {
|
package/index.js
CHANGED
|
@@ -62,7 +62,6 @@ const debounce = _interopDefault(require('debounce'));
|
|
|
62
62
|
const mkdirp = _interopDefault(require('mkdirp'));
|
|
63
63
|
const inquirer = _interopDefault(require('inquirer'));
|
|
64
64
|
const detectIndent = _interopDefault(require('detect-indent'));
|
|
65
|
-
const getLatestVersion = _interopDefault(require('latest-version'));
|
|
66
65
|
|
|
67
66
|
/**
|
|
68
67
|
Indent each line in a string.
|
|
@@ -1424,6 +1423,8 @@ async function writeConfig(answers, config) {
|
|
|
1424
1423
|
}
|
|
1425
1424
|
// Updates package.json (script and plugins as dependencies)
|
|
1426
1425
|
async function writePackage(answers, configLocation) {
|
|
1426
|
+
// dynamic import because latest-version is pure ESM
|
|
1427
|
+
const getLatestVersion = (await new Promise(function (resolve) { resolve(_interopNamespace(require('latest-version'))); })).default;
|
|
1427
1428
|
// script
|
|
1428
1429
|
const pkgPath = path.resolve(process.cwd(), 'package.json');
|
|
1429
1430
|
const pkgContent = fs.readFileSync(pkgPath, {
|
package/index.mjs
CHANGED
|
@@ -35,7 +35,6 @@ import debounce from 'debounce';
|
|
|
35
35
|
import mkdirp from 'mkdirp';
|
|
36
36
|
import inquirer from 'inquirer';
|
|
37
37
|
import detectIndent from 'detect-indent';
|
|
38
|
-
import getLatestVersion from 'latest-version';
|
|
39
38
|
|
|
40
39
|
/**
|
|
41
40
|
Indent each line in a string.
|
|
@@ -1397,6 +1396,8 @@ async function writeConfig(answers, config) {
|
|
|
1397
1396
|
}
|
|
1398
1397
|
// Updates package.json (script and plugins as dependencies)
|
|
1399
1398
|
async function writePackage(answers, configLocation) {
|
|
1399
|
+
// dynamic import because latest-version is pure ESM
|
|
1400
|
+
const getLatestVersion = (await import('latest-version')).default;
|
|
1400
1401
|
// script
|
|
1401
1402
|
const pkgPath = resolve(process.cwd(), 'package.json');
|
|
1402
1403
|
const pkgContent = readFileSync(pkgPath, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-codegen/cli",
|
|
3
|
-
"version": "2.6.3
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
6
6
|
},
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"inquirer": "^8.0.0",
|
|
30
30
|
"is-glob": "^4.0.1",
|
|
31
31
|
"json-to-pretty-yaml": "^1.2.2",
|
|
32
|
-
"latest-version": "
|
|
32
|
+
"latest-version": "^6.0.0",
|
|
33
33
|
"listr": "^0.14.3",
|
|
34
34
|
"listr-update-renderer": "^0.5.0",
|
|
35
35
|
"log-symbols": "^4.0.0",
|