@lwc/babel-plugin-component 8.13.1 → 8.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +1 -3
- package/dist/index.cjs.js +4 -21
- package/dist/index.js +2 -19
- package/package.json +3 -3
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
declare const AMBIGUOUS_PROP_SET: Map<string, string>;
|
|
2
|
-
declare const DISALLOWED_PROP_SET: Set<string>;
|
|
3
1
|
declare const LWC_PACKAGE_ALIAS = "lwc";
|
|
4
2
|
declare const LWC_PACKAGE_EXPORTS: {
|
|
5
3
|
BASE_COMPONENT: string;
|
|
@@ -25,5 +23,5 @@ declare const TEMPLATE_KEY = "tmpl";
|
|
|
25
23
|
declare const COMPONENT_NAME_KEY = "sel";
|
|
26
24
|
declare const API_VERSION_KEY = "apiVersion";
|
|
27
25
|
declare const COMPONENT_CLASS_ID = "__lwc_component_class_internal";
|
|
28
|
-
export {
|
|
26
|
+
export { DECORATOR_TYPES, LWC_PACKAGE_ALIAS, LWC_PACKAGE_EXPORTS, LWC_COMPONENT_PROPERTIES, REGISTER_COMPONENT_ID, REGISTER_DECORATORS_ID, TEMPLATE_KEY, COMPONENT_NAME_KEY, API_VERSION_KEY, COMPONENT_CLASS_ID, };
|
|
29
27
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/index.cjs.js
CHANGED
|
@@ -17,23 +17,6 @@ var lineColumn = require('line-column');
|
|
|
17
17
|
* SPDX-License-Identifier: MIT
|
|
18
18
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
19
19
|
*/
|
|
20
|
-
// This set is for attributes that have a camel cased property name
|
|
21
|
-
// For example, div.tabIndex.
|
|
22
|
-
// We do not want users to define @api properties with these names
|
|
23
|
-
// Because the template will never call them. It'll always call the camel
|
|
24
|
-
// cased version.
|
|
25
|
-
const AMBIGUOUS_PROP_SET = new Map([
|
|
26
|
-
['bgcolor', 'bgColor'],
|
|
27
|
-
['accesskey', 'accessKey'],
|
|
28
|
-
['contenteditable', 'contentEditable'],
|
|
29
|
-
['tabindex', 'tabIndex'],
|
|
30
|
-
['maxlength', 'maxLength'],
|
|
31
|
-
['maxvalue', 'maxValue'],
|
|
32
|
-
]);
|
|
33
|
-
// This set is for attributes that can never be defined
|
|
34
|
-
// by users on their components.
|
|
35
|
-
// We throw for these.
|
|
36
|
-
const DISALLOWED_PROP_SET = new Set(['is', 'class', 'slot', 'style']);
|
|
37
20
|
const LWC_PACKAGE_ALIAS = 'lwc';
|
|
38
21
|
const LWC_PACKAGE_EXPORTS = {
|
|
39
22
|
API_DECORATOR: 'api',
|
|
@@ -291,14 +274,14 @@ function validatePropertyName(property, state) {
|
|
|
291
274
|
messageArgs: [propertyName],
|
|
292
275
|
}, state);
|
|
293
276
|
}
|
|
294
|
-
else if (DISALLOWED_PROP_SET.has(propertyName)) {
|
|
277
|
+
else if (shared.DISALLOWED_PROP_SET.has(propertyName)) {
|
|
295
278
|
throw generateError(property, {
|
|
296
279
|
errorInfo: errors.DecoratorErrors.PROPERTY_NAME_IS_RESERVED,
|
|
297
280
|
messageArgs: [propertyName],
|
|
298
281
|
}, state);
|
|
299
282
|
}
|
|
300
|
-
else if (AMBIGUOUS_PROP_SET.has(propertyName)) {
|
|
301
|
-
const camelCased = AMBIGUOUS_PROP_SET.get(propertyName);
|
|
283
|
+
else if (shared.AMBIGUOUS_PROP_SET.has(propertyName)) {
|
|
284
|
+
const camelCased = shared.AMBIGUOUS_PROP_SET.get(propertyName);
|
|
302
285
|
throw generateError(property, {
|
|
303
286
|
errorInfo: errors.DecoratorErrors.PROPERTY_NAME_IS_AMBIGUOUS,
|
|
304
287
|
messageArgs: [propertyName, camelCased],
|
|
@@ -1284,5 +1267,5 @@ function LwcClassTransform(api) {
|
|
|
1284
1267
|
}
|
|
1285
1268
|
|
|
1286
1269
|
exports.default = LwcClassTransform;
|
|
1287
|
-
/** version: 8.13.
|
|
1270
|
+
/** version: 8.13.2 */
|
|
1288
1271
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { extname, basename } from 'path';
|
|
5
5
|
import { addNamed, addDefault } from '@babel/helper-module-imports';
|
|
6
|
-
import { getAPIVersionFromNumber, generateCustomElementTagName, isAPIFeatureEnabled, LWC_VERSION_COMMENT } from '@lwc/shared';
|
|
6
|
+
import { getAPIVersionFromNumber, generateCustomElementTagName, DISALLOWED_PROP_SET, AMBIGUOUS_PROP_SET, isAPIFeatureEnabled, LWC_VERSION_COMMENT } from '@lwc/shared';
|
|
7
7
|
import { generateErrorMessage, DecoratorErrors, CompilerMetrics, LWCClassErrors } from '@lwc/errors';
|
|
8
8
|
import lineColumn from 'line-column';
|
|
9
9
|
|
|
@@ -13,23 +13,6 @@ import lineColumn from 'line-column';
|
|
|
13
13
|
* SPDX-License-Identifier: MIT
|
|
14
14
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
15
15
|
*/
|
|
16
|
-
// This set is for attributes that have a camel cased property name
|
|
17
|
-
// For example, div.tabIndex.
|
|
18
|
-
// We do not want users to define @api properties with these names
|
|
19
|
-
// Because the template will never call them. It'll always call the camel
|
|
20
|
-
// cased version.
|
|
21
|
-
const AMBIGUOUS_PROP_SET = new Map([
|
|
22
|
-
['bgcolor', 'bgColor'],
|
|
23
|
-
['accesskey', 'accessKey'],
|
|
24
|
-
['contenteditable', 'contentEditable'],
|
|
25
|
-
['tabindex', 'tabIndex'],
|
|
26
|
-
['maxlength', 'maxLength'],
|
|
27
|
-
['maxvalue', 'maxValue'],
|
|
28
|
-
]);
|
|
29
|
-
// This set is for attributes that can never be defined
|
|
30
|
-
// by users on their components.
|
|
31
|
-
// We throw for these.
|
|
32
|
-
const DISALLOWED_PROP_SET = new Set(['is', 'class', 'slot', 'style']);
|
|
33
16
|
const LWC_PACKAGE_ALIAS = 'lwc';
|
|
34
17
|
const LWC_PACKAGE_EXPORTS = {
|
|
35
18
|
API_DECORATOR: 'api',
|
|
@@ -1280,5 +1263,5 @@ function LwcClassTransform(api) {
|
|
|
1280
1263
|
}
|
|
1281
1264
|
|
|
1282
1265
|
export { LwcClassTransform as default };
|
|
1283
|
-
/** version: 8.13.
|
|
1266
|
+
/** version: 8.13.2 */
|
|
1284
1267
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
|
|
5
5
|
],
|
|
6
6
|
"name": "@lwc/babel-plugin-component",
|
|
7
|
-
"version": "8.13.
|
|
7
|
+
"version": "8.13.2",
|
|
8
8
|
"description": "Babel plugin to transform a LWC module",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"lwc"
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/helper-module-imports": "7.25.9",
|
|
50
|
-
"@lwc/errors": "8.13.
|
|
51
|
-
"@lwc/shared": "8.13.
|
|
50
|
+
"@lwc/errors": "8.13.2",
|
|
51
|
+
"@lwc/shared": "8.13.2",
|
|
52
52
|
"line-column": "~1.0.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|