🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@shined/babel-plugin-transform-import-declaration

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shined/babel-plugin-transform-import-declaration - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+5
-5
dist/index.js

@@ -43,3 +43,3 @@ "use strict";

case "kebabCase":
return (0, import_change_case.kebabCase)(name);
return (0, import_change_case.paramCase)(name);
case "camelCase":

@@ -66,6 +66,6 @@ return (0, import_change_case.camelCase)(name);

throw new Error(
`\u914D\u7F6E #${index} (source: '${config.source}'): include \u548C exclude \u4E0D\u80FD\u540C\u65F6\u914D\u7F6E\u3002
\u8BF7\u9009\u62E9\u5176\u4E2D\u4E00\u4E2A\uFF1A
- \u4F7F\u7528 include \u6307\u5B9A\u8981\u5904\u7406\u7684\u7EC4\u4EF6\uFF08\u767D\u540D\u5355\uFF09
- \u4F7F\u7528 exclude \u6307\u5B9A\u8981\u6392\u9664\u7684\u7EC4\u4EF6\uFF08\u9ED1\u540D\u5355\uFF09`
`Config #${index} (source: '${config.source}'): 'include' and 'exclude' cannot be used together.
Please choose one:
- Use 'include' to specify components to process (whitelist)
- Use 'exclude' to specify components to skip (blacklist)`
);

@@ -72,0 +72,0 @@ }

@@ -5,7 +5,7 @@ // src/index.ts

// src/transform.ts
import { camelCase, pascalCase, snakeCase, kebabCase } from "change-case";
import { camelCase, pascalCase, snakeCase, paramCase } from "change-case";
function transformFilename(name, caseType) {
switch (caseType) {
case "kebabCase":
return kebabCase(name);
return paramCase(name);
case "camelCase":

@@ -32,6 +32,6 @@ return camelCase(name);

throw new Error(
`\u914D\u7F6E #${index} (source: '${config.source}'): include \u548C exclude \u4E0D\u80FD\u540C\u65F6\u914D\u7F6E\u3002
\u8BF7\u9009\u62E9\u5176\u4E2D\u4E00\u4E2A\uFF1A
- \u4F7F\u7528 include \u6307\u5B9A\u8981\u5904\u7406\u7684\u7EC4\u4EF6\uFF08\u767D\u540D\u5355\uFF09
- \u4F7F\u7528 exclude \u6307\u5B9A\u8981\u6392\u9664\u7684\u7EC4\u4EF6\uFF08\u9ED1\u540D\u5355\uFF09`
`Config #${index} (source: '${config.source}'): 'include' and 'exclude' cannot be used together.
Please choose one:
- Use 'include' to specify components to process (whitelist)
- Use 'exclude' to specify components to skip (blacklist)`
);

@@ -38,0 +38,0 @@ }

{
"name": "@shined/babel-plugin-transform-import-declaration",
"version": "0.0.3",
"version": "0.0.4",
"description": "A Babel plugin to transform import declarations for tree-shaking and on-demand loading",

@@ -33,3 +33,3 @@ "main": "./dist/index.js",

"dependencies": {
"change-case": "^5.4.4"
"change-case": "4.1.2"
},

@@ -36,0 +36,0 @@ "publishConfig": {