Comparing version 1.4.3 to 1.4.4
@@ -5,2 +5,9 @@ # Changelog | ||
### [1.4.4](https://github.com/nonara/ts-patch/compare/v1.4.3...v1.4.4) (2021-08-27) | ||
### Bug Fixes | ||
* `--basedir` flag fails if dir is not a subdir of a package ([5912288](https://github.com/nonara/ts-patch/commit/5912288f36f98a1722252d150a456c139e3f8382)) | ||
### [1.4.3](https://github.com/nonara/ts-patch/compare/v1.4.2...v1.4.3) (2021-08-23) | ||
@@ -7,0 +14,0 @@ |
@@ -73,4 +73,11 @@ "use strict"; | ||
throw new system_1.PackageError(basedir + " is not a valid directory"); | ||
var possiblePackageDirs = [basedir, path_1.default.dirname(resolve_1.default.sync("typescript/package.json", { basedir: basedir }))]; | ||
var _loop_1 = function (packageDir) { | ||
var possiblePackageDirs = [basedir, function () { return path_1.default.dirname(resolve_1.default.sync("typescript/package.json", { basedir: basedir })); }]; | ||
var _loop_1 = function (d) { | ||
var packageDir = void 0; | ||
try { | ||
packageDir = typeof d === 'function' ? d() : d; | ||
} | ||
catch (_a) { | ||
return "break"; | ||
} | ||
/* Parse package.json data */ | ||
@@ -80,3 +87,3 @@ var packageFile = path_1.default.join(packageDir, 'package.json'); | ||
return "continue"; | ||
var _a = (function () { | ||
var _b = (function () { | ||
try { | ||
@@ -88,3 +95,3 @@ return JSON.parse(fs_1.default.readFileSync(packageFile, 'utf8')); | ||
} | ||
})(), name = _a.name, version = _a.version; | ||
})(), name = _b.name, version = _b.version; | ||
/* Validate */ | ||
@@ -95,6 +102,8 @@ if (name === 'typescript') | ||
for (var _i = 0, possiblePackageDirs_1 = possiblePackageDirs; _i < possiblePackageDirs_1.length; _i++) { | ||
var packageDir = possiblePackageDirs_1[_i]; | ||
var state_1 = _loop_1(packageDir); | ||
var d = possiblePackageDirs_1[_i]; | ||
var state_1 = _loop_1(d); | ||
if (typeof state_1 === "object") | ||
return state_1.value; | ||
if (state_1 === "break") | ||
break; | ||
} | ||
@@ -101,0 +110,0 @@ throw new system_1.PackageError("Could not find typescript package from " + basedir); |
{ | ||
"name": "ts-patch", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "Patch typescript to support custom transformers in tsconfig.json", | ||
@@ -33,3 +33,5 @@ "main": "./index.js", | ||
"shelljs": "^0.8.4", | ||
"strip-ansi": "^6.0.0" | ||
"strip-ansi": "^6.0.0", | ||
"glob": "^7.1.7", | ||
"resolve": "^1.20.0" | ||
}, | ||
@@ -36,0 +38,0 @@ "bin": { |
@@ -308,3 +308,3 @@ [![npm version](https://badge.fury.io/js/ts-patch.svg)](https://badge.fury.io/js/ts-patch) | ||
- Read the handbook and still stuck? [Ask in Discussions](https://github.com/nonara/ts-patch/discussions) - someone may answer if they have time. | ||
- Check out the `#compiler` room on the [TypeScript Discord Server](https://discord.com/invite/typescript). | ||
- Check out the `#compiler-api` room on the [TypeScript Discord Server](https://discord.com/invite/typescript). | ||
@@ -311,0 +311,0 @@ ## License |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
209466
3058
8
+ Addedglob@^7.1.7
+ Addedresolve@^1.20.0