Socket
Socket
Sign inDemoInstall

@ms-cloudpack/import-map

Package Overview
Dependencies
Maintainers
0
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ms-cloudpack/import-map - npm Package Compare versions

Comparing version 0.5.16 to 0.5.17

16

lib/createImportMap.js

@@ -36,11 +36,17 @@ import { getExportsMap, isExternalPackage } from '@ms-cloudpack/package-utilities';

const exportsMap = await getExportsMap({ packagePath: entry.path }, { packages, config });
if (!definition ||
!definition.version ||
!exportsMap ||
Object.keys(exportsMap).length === 0 ||
name.startsWith('@types/')) {
if (!definition || !definition.version || name.startsWith('@types/')) {
return importMap;
}
const noExportsMap = !exportsMap || Object.keys(exportsMap).length === 0;
const packagePrefix = `${name}@${entry.version}/`;
const baseUrl = `${urls.bundleServer}/${packagePrefix}`;
// If the package has no exports map, we can't generate an import map for it.
if (noExportsMap) {
// Except for when autoUpdateEntries is enabled, in which case we can add a fallback
// so we can add entries to the exports map later.
if (config.features?.autoUpdateEntries && importMap[definition.name + '/'] === undefined) {
importMap[definition.name + '/'] = baseUrl + 'missing/';
}
return importMap;
}
const isExternal = isExternalPackage(entry.path);

@@ -47,0 +53,0 @@ const targetVersion = targetVersions?.[entry.path];

{
"name": "@ms-cloudpack/import-map",
"version": "0.5.16",
"version": "0.5.17",
"description": "Utilities for creating/updating import maps.",

@@ -17,6 +17,6 @@ "license": "MIT",

"dependencies": {
"@ms-cloudpack/common-types": "^0.8.2",
"@ms-cloudpack/package-utilities": "^7.7.0",
"@ms-cloudpack/common-types": "^0.9.0",
"@ms-cloudpack/package-utilities": "^7.7.1",
"@ms-cloudpack/path-string-parsing": "^1.2.3",
"@ms-cloudpack/path-utilities": "^2.7.20",
"@ms-cloudpack/path-utilities": "^2.7.21",
"merge": "^2.1.1"

@@ -23,0 +23,0 @@ },

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