Socket
Socket
Sign inDemoInstall

@ms-cloudpack/package-utilities

Package Overview
Dependencies
Maintainers
2
Versions
203
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ms-cloudpack/package-utilities - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

23

CHANGELOG.json

@@ -5,3 +5,24 @@ {

{
"date": "Thu, 01 Dec 2022 08:10:30 GMT",
"date": "Sat, 03 Dec 2022 08:10:22 GMT",
"tag": "@ms-cloudpack/package-utilities_v2.1.2",
"version": "2.1.2",
"comments": {
"patch": [
{
"author": "dake.3601@gmail.com",
"package": "@ms-cloudpack/package-utilities",
"commit": "9fae6cbdb788baac8236abc9eb44eb1d3296b7e0",
"comment": "Used async isFile to improve performance"
},
{
"author": "beachball",
"package": "@ms-cloudpack/package-utilities",
"comment": "Bump @ms-cloudpack/path-utilities to v2.0.0",
"commit": "adb6e5b06d2100f33ff9975c2999b81f81b65616"
}
]
}
},
{
"date": "Thu, 01 Dec 2022 08:10:47 GMT",
"tag": "@ms-cloudpack/package-utilities_v2.1.1",

@@ -8,0 +29,0 @@ "version": "2.1.1",

# Change Log - @ms-cloudpack/package-utilities
This log was last generated on Thu, 01 Dec 2022 08:10:30 GMT and should not be manually modified.
This log was last generated on Sat, 03 Dec 2022 08:10:22 GMT and should not be manually modified.
<!-- Start content -->
## 2.1.2
Sat, 03 Dec 2022 08:10:22 GMT
### Patches
- Used async isFile to improve performance (dake.3601@gmail.com)
- Bump @ms-cloudpack/path-utilities to v2.0.0
## 2.1.1
Thu, 01 Dec 2022 08:10:30 GMT
Thu, 01 Dec 2022 08:10:47 GMT

@@ -11,0 +20,0 @@ ### Patches

19

lib/findFileInPackage.js
import path from 'path';
import { intermediateToSourcePath, isFile, sourceToIntermediatePath } from '@ms-cloudpack/path-utilities';
import { intermediateToSourcePath, sourceToIntermediatePath, isFile } from '@ms-cloudpack/path-utilities';
import { isExternalPackage } from './isExternalPackage.js';

@@ -29,7 +29,18 @@ import { safeRelativePath } from '@ms-cloudpack/path-string-parsing';

];
// Try and find the intermediate file.
filePath = candidates.find((candidate) => isFile(path.join(packagePath, candidate)));
filePath = undefined;
for (const candidate of candidates) {
if (await isFile(path.join(packagePath, candidate))) {
filePath = candidate;
break;
}
}
// For internal packages, try and find source/typings and convert to intermediate (which may be missing.)
if (isInternal) {
sourcePath = [...candidates.map((candidate) => intermediateToSourcePath(candidate, packagePath))].find((candidate) => candidate && isFile(path.join(packagePath, candidate)));
for (const candidate of candidates) {
const intermediateCandidate = intermediateToSourcePath(candidate, packagePath);
if (intermediateCandidate && (await isFile(path.join(packagePath, intermediateCandidate)))) {
sourcePath = intermediateCandidate;
break;
}
}
// If we couldn't find a unique source file, stick with the resolved intermediate file as the only known truth.

@@ -36,0 +47,0 @@ if (filePath && sourcePath === filePath) {

{
"name": "@ms-cloudpack/package-utilities",
"version": "2.1.1",
"version": "2.1.2",
"description": "Utilities for resolving/parsing packages and their imports.",

@@ -20,3 +20,3 @@ "license": "MIT",

"@ms-cloudpack/package-overrides": "^0.2.0",
"@ms-cloudpack/path-utilities": "^1.1.1",
"@ms-cloudpack/path-utilities": "^2.0.0",
"@ms-cloudpack/path-string-parsing": "^1.0.0",

@@ -23,0 +23,0 @@ "merge": "^2.1.1",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc