editorconfig-checker
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -19,12 +19,8 @@ # Changelog | ||
## [4.0.0] - 2021-03-14 | ||
- Switch to Github Actions [#228](https://github.com/editorconfig-checker/editorconfig-checker.javascript/pull/228) ([@mstruebing](https://github.com/mstruebing)) | ||
### Breaking | ||
## [4.0.1] - 2021-03-16 | ||
- Use config file to get core specific version [#222](https://github.com/editorconfig-checker/editorconfig-checker.javascript/pull/222) | ||
- Rollback own package manager configuration via version in config file | ||
### Misc | ||
- Switch to Github Actions [#228](https://github.com/editorconfig-checker/editorconfig-checker.javascript/pull/228) ([@mstruebing](https://github.com/mstruebing)) | ||
## [3.3.0] - 2020-10-20 | ||
@@ -31,0 +27,0 @@ |
@@ -58,17 +58,9 @@ #!/usr/bin/env node | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var child_process_1 = require("child_process"); | ||
var tar = __importStar(require("tar")); | ||
var fs_1 = __importDefault(require("fs")); | ||
var util_1 = __importDefault(require("util")); | ||
var rimraf_1 = __importDefault(require("rimraf")); | ||
var lib_1 = require("./lib"); | ||
var mkdir = util_1.default.promisify(fs_1.default.mkdir); | ||
var rename = util_1.default.promisify(fs_1.default.rename); | ||
var FLAGS = ["--reload", "--clean", "--skip-update-check"]; | ||
var execute = function (version) { | ||
var ecProcess = child_process_1.spawn("" + lib_1.binary(version), process.argv.slice(2).filter(function (i) { return !FLAGS.includes(i); })); | ||
var utils_1 = require("./utils"); | ||
var CORE_VERSION = "2.3.4"; | ||
var execute = function () { | ||
var ecProcess = child_process_1.spawn("" + utils_1.binary(), process.argv.slice(2)); | ||
ecProcess.stdout.on("data", function (data) { | ||
@@ -87,73 +79,25 @@ console.log("" + data); | ||
(function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var clean, reload, config, version, versions, latestVersion, skipUpdateCheck, tarFilePath, myFile; | ||
var tarFilePath, myFile; | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
if (process.argv.includes("--help")) { | ||
console.log("wrapper specific arguments: "); | ||
console.log("\t--reload\tredownloads the binary"); | ||
console.log("\t--skip-update-check\tdon't check for new versions"); | ||
console.log("\t--clean\tdeletes all cached files"); | ||
} | ||
clean = process.argv.includes("--clean"); | ||
if (clean) { | ||
rimraf_1.default.sync(lib_1.ecRootDir() + "/bin"); | ||
if (utils_1.isFile(utils_1.binary())) { | ||
execute(); | ||
return [2 /*return*/]; | ||
} | ||
reload = process.argv.includes("--reload"); | ||
return [4 /*yield*/, lib_1.getConfig()]; | ||
tarFilePath = utils_1.ecRootDir() + "/ec.tar.gz"; | ||
return [4 /*yield*/, utils_1.downloadFile(utils_1.downloadUrl(CORE_VERSION, utils_1.getReleaseArchiveNameForCurrentPlatform()), tarFilePath)]; | ||
case 1: | ||
config = _a.sent(); | ||
version = config.Version; | ||
if (!reload && lib_1.isFile(lib_1.binary(version))) { | ||
execute(version); | ||
return [2 /*return*/]; | ||
} | ||
return [4 /*yield*/, lib_1.getAvailableVersions()]; | ||
case 2: | ||
versions = _a.sent(); | ||
latestVersion = versions.reduce(function (acc, curr) { return (acc > curr ? acc : curr); }, ""); | ||
skipUpdateCheck = process.argv.includes("--skip-update-check") || config.SkipUpdateCheck; | ||
if (!versions.includes(version)) { | ||
if (typeof version === "undefined") { | ||
version = latestVersion; | ||
} | ||
else { | ||
console.log("No version " + version + " available"); | ||
return [2 /*return*/]; | ||
} | ||
} | ||
if (!skipUpdateCheck && latestVersion !== version) { | ||
console.warn("There is a new version available: " + latestVersion); | ||
console.warn("You are using: " + version); | ||
} | ||
tarFilePath = lib_1.ecRootDir() + "/ec.tar.gz"; | ||
return [4 /*yield*/, lib_1.downloadFile(lib_1.downloadUrl(version, lib_1.getReleaseArchiveNameForCurrentPlatform()), tarFilePath)]; | ||
case 3: | ||
myFile = _a.sent(); | ||
myFile.once("close", function () { | ||
tar.x({ | ||
C: lib_1.ecRootDir(), | ||
cwd: lib_1.ecRootDir(), | ||
C: utils_1.ecRootDir(), | ||
cwd: utils_1.ecRootDir(), | ||
file: tarFilePath, | ||
strict: true, | ||
}) | ||
.then(function (_) { return __awaiter(void 0, void 0, void 0, function () { | ||
return __generator(this, function (_a) { | ||
switch (_a.label) { | ||
case 0: | ||
lib_1.removeFile(tarFilePath); | ||
return [4 /*yield*/, mkdir(lib_1.ecRootDir() + "/bin/" + version, { | ||
recursive: true, | ||
})]; | ||
case 1: | ||
_a.sent(); | ||
return [4 /*yield*/, rename(lib_1.ecRootDir() + "/bin/" + lib_1.getReleaseNameForCurrentPlatform(), lib_1.binary(version))]; | ||
case 2: | ||
_a.sent(); | ||
execute(version); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); }) | ||
.then(function (_) { | ||
utils_1.removeFile(tarFilePath); | ||
execute(); | ||
}) | ||
.catch(function (e) { | ||
@@ -160,0 +104,0 @@ console.error("ERROR:", e); |
{ | ||
"name": "editorconfig-checker", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "A tool to verify that your files are in harmony with your .editorconfig", | ||
@@ -41,3 +41,2 @@ "main": "src/index.js", | ||
"node-fetch": "^2.6.0", | ||
"rimraf": "^3.0.2", | ||
"tar": "^6.0.0" | ||
@@ -48,4 +47,2 @@ }, | ||
"@types/node-fetch": "^2.5.5", | ||
"@types/rimraf": "^3.0.0", | ||
"@types/tar": "^4.0.4", | ||
"prettier": "^2.0.1", | ||
@@ -52,0 +49,0 @@ "tslint": "^6.0.0", |
@@ -13,2 +13,3 @@ # editorconfig-checker | ||
<a href="https://www.buymeacoffee.com/mstruebing" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a> | ||
@@ -26,3 +27,3 @@ | ||
This is only a wrapper for the core [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker). | ||
This is only a wrapper for the core [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker). | ||
You should have a look at this repository to know how this tool can be used and what possibilities/caveats are there. | ||
@@ -71,8 +72,3 @@ This version can be used in the same way as the core as every argument is simply passed down to it. | ||
``` | ||
wrapper specific arguments: | ||
--reload redownloads the binary | ||
--skip-update-check don't check for new versions | ||
--clean deletes all cached files | ||
USAGE: | ||
-config string | ||
@@ -84,4 +80,2 @@ config | ||
disables the trailing whitespace check | ||
-disable-indent-size | ||
disables only the indent-size check | ||
-disable-indentation | ||
@@ -91,4 +85,2 @@ disables the indentation check | ||
disables the final newline check | ||
-disable-max-line-length | ||
disables only the max-line-length check | ||
-disable-trim-trailing-whitespace | ||
@@ -95,0 +87,0 @@ disables the trailing whitespace check |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3
6
3
19476
213
109
- Removedrimraf@^3.0.2
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedglob@7.2.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedrimraf@3.0.2(transitive)
- Removedwrappy@1.0.2(transitive)