@markuplint/create-rule-helper
Advanced tools
Comparing version 1.0.0-dev.20211115.1 to 1.0.0-rc.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fsExists = void 0; | ||
const tslib_1 = require("tslib"); | ||
const promises_1 = (0, tslib_1.__importDefault)(require("fs/promises")); | ||
const fs_1 = require("fs"); | ||
async function fsExists(path) { | ||
const stat = await promises_1.default.stat(path).catch(e => { | ||
const stat = await fs_1.promises.stat(path).catch(e => { | ||
if ((e === null || e === void 0 ? void 0 : e.code) === 'ENOENT') { | ||
@@ -9,0 +8,0 @@ return null; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const promises_1 = (0, tslib_1.__importDefault)(require("fs/promises")); | ||
const fs_1 = require("fs"); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
@@ -19,3 +19,3 @@ const create_rule_helper_error_1 = require("./create-rule-helper-error"); | ||
} | ||
await promises_1.default.mkdir(dir); | ||
await fs_1.promises.mkdir(dir); | ||
const transpile = params.lang === 'JAVASCRIPT'; | ||
@@ -22,0 +22,0 @@ const readme = await (0, transfer_1.transfer)(SCAFFOLD_README_FILE, dir, { name: params.name }); |
@@ -5,3 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const promises_1 = (0, tslib_1.__importDefault)(require("fs/promises")); | ||
const fs_1 = require("fs"); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
@@ -11,3 +11,3 @@ async function readPackageJson(dir) { | ||
try { | ||
const json = await promises_1.default.readFile(filePath, { encoding: 'utf-8' }); | ||
const json = await fs_1.promises.readFile(filePath, { encoding: 'utf-8' }); | ||
const data = JSON.parse(json); | ||
@@ -14,0 +14,0 @@ return (data === null || data === void 0 ? void 0 : data.name) || null; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const tslib_1 = require("tslib"); | ||
const promises_1 = (0, tslib_1.__importDefault)(require("fs/promises")); | ||
const fs_1 = require("fs"); | ||
const path_1 = (0, tslib_1.__importDefault)(require("path")); | ||
@@ -14,3 +14,3 @@ const mustache_1 = require("mustache"); | ||
const name = path_1.default.basename(filePath, extname); | ||
const contents = await promises_1.default.readFile(filePath, { encoding: 'utf-8' }); | ||
const contents = await fs_1.promises.readFile(filePath, { encoding: 'utf-8' }); | ||
let fileName = `${name}${extname}`; | ||
@@ -32,5 +32,5 @@ // Mustache | ||
const dest = path_1.default.resolve(destDir, fileName); | ||
await promises_1.default.writeFile(dest, converted, { encoding: 'utf-8' }); | ||
await fs_1.promises.writeFile(dest, converted, { encoding: 'utf-8' }); | ||
return dest; | ||
} | ||
exports.transfer = transfer; |
{ | ||
"name": "@markuplint/create-rule-helper", | ||
"version": "1.0.0-dev.20211115.1", | ||
"version": "1.0.0-rc.0", | ||
"description": "Create rule helper", | ||
@@ -20,3 +20,3 @@ "repository": "git@github.com:markuplint/markuplint.git", | ||
"dependencies": { | ||
"@markuplint/ml-core": "^2.0.0-dev.20211115.1", | ||
"@markuplint/ml-core": "2.0.0-rc.0", | ||
"mustache": "^4.2.0", | ||
@@ -27,3 +27,7 @@ "prettier": "^2.4.1", | ||
}, | ||
"gitHead": "47a5a28ecfa4ab5a0c05e98b0bfa4b5e8f346e9e" | ||
"devDependencies": { | ||
"@types/fs-extra": "^9.0.13", | ||
"fs-extra": "^10.0.0" | ||
}, | ||
"gitHead": "67134f1addbdd271ad1d425de8f296d1875dbf25" | ||
} |
@@ -27,3 +27,3 @@ # @markuplint/rule-textlint | ||
```jsonc | ||
```json | ||
// `.markuplintrc` | ||
@@ -37,3 +37,3 @@ { | ||
```jsonc | ||
```json | ||
// `.textlintrc` | ||
@@ -40,0 +40,0 @@ { |
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
54011
2
332
+ Added@markuplint/i18n@2.0.0-rc.0(transitive)
+ Added@markuplint/ml-ast@2.0.0-rc.0(transitive)
+ Added@markuplint/ml-config@2.0.0-rc.0(transitive)
+ Added@markuplint/ml-core@2.0.0-rc.0(transitive)
+ Added@markuplint/ml-spec@2.0.0-rc.0(transitive)
- Removed@markuplint/i18n@2.1.2(transitive)
- Removed@markuplint/ml-ast@2.0.1(transitive)
- Removed@markuplint/ml-config@2.1.1(transitive)
- Removed@markuplint/ml-core@2.3.7(transitive)
- Removed@markuplint/ml-spec@2.1.3(transitive)
- Removed@markuplint/parser-utils@2.2.4(transitive)
- Removed@markuplint/types@2.2.2(transitive)
- Removedbcp-47@1.0.8(transitive)
- Removedcss-tree@1.1.3(transitive)
- Removeddom-accessibility-api@0.5.16(transitive)
- Removedis-alphabetical@1.0.4(transitive)
- Removedis-alphanumerical@1.0.4(transitive)
- Removedis-decimal@1.0.4(transitive)
- Removedleven@3.1.0(transitive)
- Removedmdn-data@2.0.14(transitive)
- Removedsource-map@0.6.1(transitive)
- Removeduuid@8.3.2(transitive)
- Removedwhatwg-mimetype@2.3.0(transitive)