-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bd8c0dd
commit da780ec
Showing
45 changed files
with
811 additions
and
258 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
{ | ||
"name": "powership", | ||
"version": "3.2.16", | ||
"version": "3.2.20", | ||
"private": true, | ||
"scripts": { | ||
"pack": "run-s pack:*", | ||
"pack:publish": "run \"pnpm publish\"", | ||
"prepublishSafe": "bun-safe ./prepublishSafe.ts", | ||
"pre": "run prepublishOnly", | ||
"fix": "turbo run fix", | ||
"test": "turbo run test", | ||
"fix": "run fix", | ||
"test": "run test", | ||
"validate": "(cd packages/schema && npm run prepublish)", | ||
"doc": "typedoc", | ||
"i": "rm -rf node_modules/.pnpm && rm -rf pnpm-lock.yaml && pnpm install", | ||
"reset": "./reset.sh", | ||
"beta": "bun run scripts/beta.ts", | ||
"beta-version": "bun run scripts/beta-version.ts" | ||
}, | ||
"devDependencies": { | ||
"dependencies": { | ||
"@powership/babel-plugins": "workspace:*", | ||
"@types/fs-extra": "9.0.13", | ||
"@types/jest": "29.1.2", | ||
|
@@ -42,9 +42,13 @@ | |
"shelljs": "0.8.5", | ||
"ts-jest": "29.0.3", | ||
"ts-node": "10.9.1", | ||
"turbo": "1.9.1", | ||
"runmate": "latest", | ||
"typedoc-plugin-markdown": "3.14.0", | ||
"typescript": "4.8.2" | ||
"typescript": "4.8.2", | ||
"bun-safe": "1.0.5", | ||
"semver": "7.5.2", | ||
"typedoc": "0.23.24", | ||
"zx": "7.2.3" | ||
}, | ||
"xworkspaces": [ | ||
"@powership/accounts", | ||
|
@@ -59,16 +63,5 @@ | |
"@powership/schema", | ||
"@powership/transporter" | ||
], | ||
"dependencies": { | ||
"bun-safe": "1.0.5", | ||
"semver": "7.5.2", | ||
"typedoc": "0.23.24", | ||
"zx": "7.2.3" | ||
}, | ||
"workspaces": { | ||
"packages": [ | ||
"packages/*" | ||
] | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
packages/babel-plugins/src/babel-transform-lodash-imports-plugin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { PluginObj } from '@babel/core'; | ||
|
||
/** | ||
* Plugin to transform lodash imports to ESM format. | ||
* @returns {PluginObj} The Babel plugin object. | ||
*/ | ||
export function TransformLodashImportsPlugin(): PluginObj { | ||
return { | ||
name: 'transform-lodash-imports', | ||
|
||
visitor: { | ||
ImportDeclaration(path) { | ||
const lodashPattern = /^(lodash)(\/.*)?$/; | ||
const sourceValue = path.node.source.value; | ||
|
||
if (lodashPattern.test(sourceValue)) { | ||
// If it's a lodash import, modify it to use an ESM format. | ||
path.node.source.value = sourceValue.replace( | ||
lodashPattern, | ||
(_match, _lodash, subPath) => { | ||
// If there's a subpath (like lodash/map), format it for ESM. | ||
// Otherwise, return 'lodash-es'. | ||
return subPath ? `lodash-es${subPath}` : 'lodash-es'; | ||
} | ||
); | ||
} | ||
}, | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './strip-blocks'; | ||
export * from './module-extensions'; | ||
export * from './babel-transform-lodash-imports-plugin'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@powership/boilerplate", | ||
"version": "3.2.16", | ||
"version": "3.2.22", | ||
"author": "antoniopresto <[email protected]>", | ||
"sideEffects": false, | ||
"type": "module", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "logstorm", | ||
"version": "3.2.16", | ||
"version": "3.2.22", | ||
"typings": "out", | ||
"author": "antoniopresto <[email protected]>", | ||
"type": "module", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "powership", | ||
"version": "3.2.16", | ||
"version": "3.2.22", | ||
"author": "antoniopresto <[email protected]>", | ||
"type": "module", | ||
"main": "./out/index.cjs", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "runmate", | ||
"version": "3.2.18", | ||
"version": "3.2.22", | ||
"typings": "out", | ||
"author": "antoniopresto <[email protected]>", | ||
"license": "MIT", | ||
|
@@ -43,14 +43,17 @@ | |
"dependencies": { | ||
"@types/glob": "^8.1.0", | ||
"@types/lodash": "4.14.191", | ||
"@types/lodash-es": "4.17.12", | ||
"@types/semver": "7.3.13", | ||
"@types/vorpal": "1.12.2", | ||
"chalk": "4.1.2", | ||
"commander": "10.0.0", | ||
"fs-extra": "10.1.0", | ||
"glob": "8.1.0", | ||
"lodash": "4.17.21", | ||
"lodash-es": "4.17.21", | ||
"logstorm": "workspace:*", | ||
"@powership/utils": "workspace:*", | ||
"plugin-hooks": "2.0.0", | ||
"semver": "7.5.2", | ||
"tsx": "^3.14.0" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.