@lwc/metadata
Advanced tools
Comparing version 9.5.0 to 10.0.0-canary.9d570
@@ -78,3 +78,3 @@ 'use strict'; | ||
} */ | ||
const version = '9.5.0'; | ||
const version = '10.0.0-canary.9d570'; | ||
function collectBundleMetadata(config) { | ||
@@ -81,0 +81,0 @@ // validateBundleConfig(config); |
@@ -0,1 +1,2 @@ | ||
import { ImportDeclaration } from '@babel/types'; | ||
import { ScriptFileType } from '../../script-metadata/utils'; | ||
@@ -147,2 +148,3 @@ import { File, SourceLocation } from './common-metadata-types'; | ||
namespaceImport?: NamespaceImport; | ||
importKind?: ImportDeclaration['importKind']; | ||
moduleSpecifier: string; | ||
@@ -159,2 +161,3 @@ location: SourceLocation; | ||
aliasName?: string; | ||
importKind?: ImportDeclaration['importKind']; | ||
location: SourceLocation; | ||
@@ -161,0 +164,0 @@ } |
@@ -14,3 +14,3 @@ 'use strict'; | ||
function gatherImportMetadata(node, result, refId) { | ||
const { source: { value: moduleSpecifier }, specifiers, } = node; | ||
const { source: { value: moduleSpecifier }, specifiers, importKind, } = node; | ||
const importMetadata = { | ||
@@ -21,2 +21,6 @@ moduleSpecifier, | ||
}; | ||
// add import kind for type imports in TypeScript files | ||
if (importKind) { | ||
importMetadata.importKind = importKind; | ||
} | ||
const namedImports = []; | ||
@@ -42,9 +46,13 @@ specifiers.forEach((specifier) => { | ||
case 'ImportSpecifier': { | ||
const { imported } = specifier; | ||
const { imported, importKind } = specifier; | ||
const importedName = resolver.resolveImportSpecifierImported(imported); | ||
namedImports.push({ | ||
const namedImport = { | ||
name: importedName, | ||
aliasName: local.name === importedName ? undefined : local.name, | ||
location, | ||
}); | ||
}; | ||
if (importKind) { | ||
namedImport.importKind = importKind; | ||
} | ||
namedImports.push(namedImport); | ||
break; | ||
@@ -51,0 +59,0 @@ } |
{ | ||
"name": "@lwc/metadata", | ||
"version": "9.5.0", | ||
"version": "10.0.0-canary.9d570", | ||
"description": "Extract metadata about Lightning Web Components modules. This software is provided as-is with no support provided.", | ||
@@ -20,3 +20,3 @@ "main": "dist/index.js", | ||
"@babel/types": "~7.24.8", | ||
"@lwc/sfdc-compiler-utils": "9.5.0", | ||
"@lwc/sfdc-compiler-utils": "10.0.0-canary.9d570", | ||
"postcss": "~8.4.39", | ||
@@ -36,3 +36,4 @@ "postcss-selector-parser": "~6.1.0", | ||
"node": ">=14" | ||
} | ||
}, | ||
"gitHead": "13df46dd4cdda16cf832962cbe9d1342b48ae561" | ||
} |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
337458
239
5197
2
1
1
+ Added@lwc/sfdc-compiler-utils@10.0.0-canary.9d570(transitive)
- Removed@lwc/sfdc-compiler-utils@9.5.0(transitive)