@graphql-codegen/cli 2.6.0-alpha-3f811f314.0 → 2.6.0-alpha-64b0da579.0
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 +4 -4
- package/index.js +4 -4
- package/index.mjs +4 -4
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -57,7 +57,6 @@ const os = require('os');
|
|
|
57
57
|
const Listr = _interopDefault(require('listr'));
|
|
58
58
|
const isGlob = _interopDefault(require('is-glob'));
|
|
59
59
|
const debounce = _interopDefault(require('debounce'));
|
|
60
|
-
const promises = require('fs/promises');
|
|
61
60
|
const mkdirp = _interopDefault(require('mkdirp'));
|
|
62
61
|
const crypto = require('crypto');
|
|
63
62
|
const inquirer = _interopDefault(require('inquirer'));
|
|
@@ -1257,15 +1256,16 @@ const createWatcher = (initalContext, onNext) => {
|
|
|
1257
1256
|
});
|
|
1258
1257
|
};
|
|
1259
1258
|
|
|
1259
|
+
const { writeFile: fsWriteFile, readFile: fsReadFile, stat: fsStat } = fs.promises;
|
|
1260
1260
|
function writeFile(filepath, content) {
|
|
1261
|
-
return
|
|
1261
|
+
return fsWriteFile(filepath, content);
|
|
1262
1262
|
}
|
|
1263
1263
|
function readFile(filepath) {
|
|
1264
|
-
return
|
|
1264
|
+
return fsReadFile(filepath, 'utf-8');
|
|
1265
1265
|
}
|
|
1266
1266
|
async function fileExists(filePath) {
|
|
1267
1267
|
try {
|
|
1268
|
-
return (await
|
|
1268
|
+
return (await fsStat(filePath)).isFile();
|
|
1269
1269
|
}
|
|
1270
1270
|
catch (err) {
|
|
1271
1271
|
return false;
|
package/index.js
CHANGED
|
@@ -58,7 +58,6 @@ const Listr = _interopDefault(require('listr'));
|
|
|
58
58
|
const child_process = require('child_process');
|
|
59
59
|
const isGlob = _interopDefault(require('is-glob'));
|
|
60
60
|
const debounce = _interopDefault(require('debounce'));
|
|
61
|
-
const promises = require('fs/promises');
|
|
62
61
|
const mkdirp = _interopDefault(require('mkdirp'));
|
|
63
62
|
const crypto = require('crypto');
|
|
64
63
|
const inquirer = _interopDefault(require('inquirer'));
|
|
@@ -1258,15 +1257,16 @@ const createWatcher = (initalContext, onNext) => {
|
|
|
1258
1257
|
});
|
|
1259
1258
|
};
|
|
1260
1259
|
|
|
1260
|
+
const { writeFile: fsWriteFile, readFile: fsReadFile, stat: fsStat } = fs.promises;
|
|
1261
1261
|
function writeFile(filepath, content) {
|
|
1262
|
-
return
|
|
1262
|
+
return fsWriteFile(filepath, content);
|
|
1263
1263
|
}
|
|
1264
1264
|
function readFile(filepath) {
|
|
1265
|
-
return
|
|
1265
|
+
return fsReadFile(filepath, 'utf-8');
|
|
1266
1266
|
}
|
|
1267
1267
|
async function fileExists(filePath) {
|
|
1268
1268
|
try {
|
|
1269
|
-
return (await
|
|
1269
|
+
return (await fsStat(filePath)).isFile();
|
|
1270
1270
|
}
|
|
1271
1271
|
catch (err) {
|
|
1272
1272
|
return false;
|
package/index.mjs
CHANGED
|
@@ -31,7 +31,6 @@ import Listr from 'listr';
|
|
|
31
31
|
import { exec } from 'child_process';
|
|
32
32
|
import isGlob from 'is-glob';
|
|
33
33
|
import debounce from 'debounce';
|
|
34
|
-
import { writeFile as writeFile$1, readFile as readFile$1, stat } from 'fs/promises';
|
|
35
34
|
import mkdirp from 'mkdirp';
|
|
36
35
|
import { createHash } from 'crypto';
|
|
37
36
|
import inquirer from 'inquirer';
|
|
@@ -1231,15 +1230,16 @@ const createWatcher = (initalContext, onNext) => {
|
|
|
1231
1230
|
});
|
|
1232
1231
|
};
|
|
1233
1232
|
|
|
1233
|
+
const { writeFile: fsWriteFile, readFile: fsReadFile, stat: fsStat } = promises;
|
|
1234
1234
|
function writeFile(filepath, content) {
|
|
1235
|
-
return
|
|
1235
|
+
return fsWriteFile(filepath, content);
|
|
1236
1236
|
}
|
|
1237
1237
|
function readFile(filepath) {
|
|
1238
|
-
return
|
|
1238
|
+
return fsReadFile(filepath, 'utf-8');
|
|
1239
1239
|
}
|
|
1240
1240
|
async function fileExists(filePath) {
|
|
1241
1241
|
try {
|
|
1242
|
-
return (await
|
|
1242
|
+
return (await fsStat(filePath)).isFile();
|
|
1243
1243
|
}
|
|
1244
1244
|
catch (err) {
|
|
1245
1245
|
return false;
|
package/package.json
CHANGED