@lwc/babel-plugin-component
Advanced tools
Comparing version 6.2.0 to 6.2.1
@@ -15,3 +15,6 @@ import { Node, types, Visitor } from '@babel/core'; | ||
declare function validateImportedLwcDecoratorUsage(engineImportSpecifiers: ImportSpecifier[], state: LwcBabelPluginPass): void; | ||
/** Remove import specifiers. It also removes the import statement if the specifier list becomes empty */ | ||
/** | ||
* Remove import specifiers. It also removes the import statement if the specifier list becomes empty | ||
* @param engineImportSpecifiers | ||
*/ | ||
declare function removeImportedDecoratorSpecifiers(engineImportSpecifiers: { | ||
@@ -18,0 +21,0 @@ name: any; |
import { Visitor } from '@babel/core'; | ||
import { LwcBabelPluginPass } from './types'; | ||
/** | ||
* Expected API for this plugin: | ||
* { dynamicImports: { loader: string, strictSpecifier: boolean } } | ||
*/ | ||
export default function (): Visitor<LwcBabelPluginPass>; |
@@ -812,7 +812,14 @@ /** | ||
} | ||
/** Returns a list of all the references to an identifier */ | ||
/** | ||
* Returns a list of all the references to an identifier | ||
* @param identifier | ||
*/ | ||
function getReferences(identifier) { | ||
return identifier.scope.getBinding(identifier.node.name).referencePaths; | ||
} | ||
/** Returns the type of decorator depdending on the property or method if get applied to */ | ||
/** | ||
* Returns the type of decorator depdending on the property or method if get applied to | ||
* @param decoratorPath | ||
* @param state | ||
*/ | ||
function getDecoratedNodeType(decoratorPath, state) { | ||
@@ -878,3 +885,7 @@ const propertyOrMethod = decoratorPath.parentPath; | ||
} | ||
/** Validate the usage of decorator by calling each validation function */ | ||
/** | ||
* Validate the usage of decorator by calling each validation function | ||
* @param decorators | ||
* @param state | ||
*/ | ||
function validate(decorators, state) { | ||
@@ -889,3 +900,6 @@ for (const { name, path } of decorators) { | ||
} | ||
/** Remove import specifiers. It also removes the import statement if the specifier list becomes empty */ | ||
/** | ||
* Remove import specifiers. It also removes the import statement if the specifier list becomes empty | ||
* @param engineImportSpecifiers | ||
*/ | ||
function removeImportedDecoratorSpecifiers(engineImportSpecifiers) { | ||
@@ -1091,3 +1105,3 @@ engineImportSpecifiers | ||
} | ||
/* | ||
/** | ||
* Expected API for this plugin: | ||
@@ -1184,4 +1198,5 @@ * { dynamicImports: { loader: string, strictSpecifier: boolean } } | ||
* The transform is done in 2 passes: | ||
* - First, apply in a single AST traversal the decorators and the component transformation. | ||
* - Then, in a second path transform class properties using the official babel plugin "babel-plugin-transform-class-properties". | ||
* - First, apply in a single AST traversal the decorators and the component transformation. | ||
* - Then, in a second path transform class properties using the official babel plugin "babel-plugin-transform-class-properties". | ||
* @param api | ||
*/ | ||
@@ -1227,3 +1242,3 @@ function LwcClassTransform(api) { | ||
exports.default = LwcClassTransform; | ||
/** version: 6.2.0 */ | ||
/** version: 6.2.1 */ | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -6,5 +6,6 @@ import { BabelAPI, LwcBabelPluginPass } from './types'; | ||
* The transform is done in 2 passes: | ||
* - First, apply in a single AST traversal the decorators and the component transformation. | ||
* - Then, in a second path transform class properties using the official babel plugin "babel-plugin-transform-class-properties". | ||
* - First, apply in a single AST traversal the decorators and the component transformation. | ||
* - Then, in a second path transform class properties using the official babel plugin "babel-plugin-transform-class-properties". | ||
* @param api | ||
*/ | ||
export default function LwcClassTransform(api: BabelAPI): PluginObj<LwcBabelPluginPass>; |
@@ -808,7 +808,14 @@ /** | ||
} | ||
/** Returns a list of all the references to an identifier */ | ||
/** | ||
* Returns a list of all the references to an identifier | ||
* @param identifier | ||
*/ | ||
function getReferences(identifier) { | ||
return identifier.scope.getBinding(identifier.node.name).referencePaths; | ||
} | ||
/** Returns the type of decorator depdending on the property or method if get applied to */ | ||
/** | ||
* Returns the type of decorator depdending on the property or method if get applied to | ||
* @param decoratorPath | ||
* @param state | ||
*/ | ||
function getDecoratedNodeType(decoratorPath, state) { | ||
@@ -874,3 +881,7 @@ const propertyOrMethod = decoratorPath.parentPath; | ||
} | ||
/** Validate the usage of decorator by calling each validation function */ | ||
/** | ||
* Validate the usage of decorator by calling each validation function | ||
* @param decorators | ||
* @param state | ||
*/ | ||
function validate(decorators, state) { | ||
@@ -885,3 +896,6 @@ for (const { name, path } of decorators) { | ||
} | ||
/** Remove import specifiers. It also removes the import statement if the specifier list becomes empty */ | ||
/** | ||
* Remove import specifiers. It also removes the import statement if the specifier list becomes empty | ||
* @param engineImportSpecifiers | ||
*/ | ||
function removeImportedDecoratorSpecifiers(engineImportSpecifiers) { | ||
@@ -1087,3 +1101,3 @@ engineImportSpecifiers | ||
} | ||
/* | ||
/** | ||
* Expected API for this plugin: | ||
@@ -1180,4 +1194,5 @@ * { dynamicImports: { loader: string, strictSpecifier: boolean } } | ||
* The transform is done in 2 passes: | ||
* - First, apply in a single AST traversal the decorators and the component transformation. | ||
* - Then, in a second path transform class properties using the official babel plugin "babel-plugin-transform-class-properties". | ||
* - First, apply in a single AST traversal the decorators and the component transformation. | ||
* - Then, in a second path transform class properties using the official babel plugin "babel-plugin-transform-class-properties". | ||
* @param api | ||
*/ | ||
@@ -1223,3 +1238,3 @@ function LwcClassTransform(api) { | ||
export { LwcClassTransform as default }; | ||
/** version: 6.2.0 */ | ||
/** version: 6.2.1 */ | ||
//# sourceMappingURL=index.js.map |
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/babel-plugin-component", | ||
"version": "6.2.0", | ||
"version": "6.2.1", | ||
"description": "Babel plugin to transform a LWC module", | ||
@@ -47,4 +47,4 @@ "keywords": [ | ||
"@babel/helper-module-imports": "7.22.15", | ||
"@lwc/errors": "6.2.0", | ||
"@lwc/shared": "6.2.0", | ||
"@lwc/errors": "6.2.1", | ||
"@lwc/shared": "6.2.1", | ||
"line-column": "~1.0.2" | ||
@@ -51,0 +51,0 @@ }, |
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
195795
2626
+ Added@lwc/errors@6.2.1(transitive)
+ Added@lwc/shared@6.2.1(transitive)
- Removed@lwc/errors@6.2.0(transitive)
- Removed@lwc/shared@6.2.0(transitive)
Updated@lwc/errors@6.2.1
Updated@lwc/shared@6.2.1