Skip to content

Commit

Permalink
chore(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#475)
Browse files Browse the repository at this point in the history
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.3.5 to 4.4.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v4.3.5...v4.4.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tommy Nguyen <[email protected]>
  • Loading branch information
dependabot[bot] and tido64 authored Aug 30, 2021
1 parent d0e7fad commit 203f872
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
26 changes: 16 additions & 10 deletions windows/test-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ function findUserProjects(projectDir, projects = []) {
}, projects);
}

/**
* Returns whether specified object is Error-like.
* @param {unknown} e
* @returns {e is Error}
*/
function isErrorLike(e) {
return typeof e === "object" && e !== null && "name" in e && "message" in e;
}

/**
* Returns a NuGet package entry for specified package id and version.
* @param {string} id NuGet package id
Expand Down Expand Up @@ -176,16 +185,9 @@ function toProjectEntry(project, destPath) {
* @param {{ [pattern: string]: string }=} replacements e.g. {'TextToBeReplaced': 'Replacement'}
*/
function copyAndReplace(srcPath, destPath, replacements = {}) {
/** @type {(e: NodeJS.ErrnoException | null) => void} */
const throwOnError = (e) => {
if (e) {
throw e;
}
};

if (binaryExtensions.includes(path.extname(srcPath))) {
// Binary file
return fs.copyFile(srcPath, destPath, throwOnError);
return fs.copyFile(srcPath, destPath, rethrow);
} else {
// Text file
return fs.writeFile(
Expand All @@ -198,7 +200,7 @@ function copyAndReplace(srcPath, destPath, replacements = {}) {
encoding: "utf-8",
mode: fs.statSync(srcPath).mode,
},
throwOnError
rethrow
);
}
}
Expand Down Expand Up @@ -238,7 +240,11 @@ function getBundleResources(manifestFilePath, projectFilesDestPath) {
bundleFileContent,
};
} catch (e) {
console.warn(`Could not parse 'app.json':\n${e.message}`);
if (isErrorLike(e)) {
console.warn(`Could not parse 'app.json':\n${e.message}`);
} else {
throw e;
}
}
} else {
console.warn("Could not find 'app.json' file.");
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9383,9 +9383,9 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^4.0.0:
version "4.3.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4"
integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==
version "4.4.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz#6d618640d430e3569a1dfb44f7d7e600ced3ee86"
integrity sha512-gzP+t5W4hdy4c+68bfcv0t400HVJMMd2+H9B7gae1nQlBzCqvrXX+6GL/b3GAgyTH966pzrZ70/fRjwAtZksSQ==

ua-parser-js@^0.7.18:
version "0.7.28"
Expand Down

0 comments on commit 203f872

Please sign in to comment.