From 544d037de9a8378b84cd5b0d3da84756a3b68e2b Mon Sep 17 00:00:00 2001 From: Pearce Date: Thu, 22 Jun 2023 13:07:12 -0700 Subject: [PATCH 1/2] fork to sigma and fix babel issue --- package.json | 9 +++++++-- src/index.js | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index adb1028..fe3a9fa 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,13 @@ { - "name": "babel-plugin-lodash", + "name": "@sigmacomputing/babel-plugin-lodash", "version": "3.3.4", "description": "Modular Lodash builds without the hassle.", - "keywords": "babel-plugin, cherry-pick, lodash, modules", + "keywords": [ + "babel-plugin", + "cherry-pick", + "lodash", + "modules" + ], "repository": "lodash/babel-plugin-lodash", "license": "MIT", "main": "lib/index.js", diff --git a/src/index.js b/src/index.js index 92bae38..2360251 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ import _ from 'lodash' -import { isModuleDeclaration } from '@babel/types' +import { isImportDeclaration, isExportDeclaration } from '@babel/types' import config from './config' import importModule from './importModule' @@ -72,7 +72,7 @@ export default function lodash({ types }) { let isModule = false for (const node of file.ast.program.body) { - if (isModuleDeclaration(node)) { + if (isImportDeclaration(node) || isExportDeclaration(node)) { isModule = true break } From 23365bcbce5c8d936c41d7f3263719c9d4312675 Mon Sep 17 00:00:00 2001 From: Pearce Date: Thu, 22 Jun 2023 13:07:24 -0700 Subject: [PATCH 2/2] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fe3a9fa..f9c5dad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sigmacomputing/babel-plugin-lodash", - "version": "3.3.4", + "version": "3.3.5", "description": "Modular Lodash builds without the hassle.", "keywords": [ "babel-plugin",