Skip to content

Commit

Permalink
chore: swap babel-plugin-lodash with updated version that doesn't use…
Browse files Browse the repository at this point in the history
… deprecated APIs (#38797) (#38803)

(cherry picked from commit 3d4d6a6)

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
  • Loading branch information
gatsbybot and pieh committed Jan 10, 2024
1 parent fc0eea1 commit c9f8c24
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions examples/using-remark/package.json
Expand Up @@ -5,7 +5,7 @@
"version": "1.0.0",
"author": "Florian Kissling <sechskilo@gmail.com>",
"dependencies": {
"babel-plugin-lodash": "^3.3.4",
"@sigmacomputing/babel-plugin-lodash": "^3.3.5",
"es6-object-assign": "^1.1.0",
"gatsby": "next",
"gatsby-core-utils": "next",
Expand Down Expand Up @@ -50,4 +50,4 @@
"start": "npm run develop",
"serve": "gatsby serve"
}
}
}
12 changes: 6 additions & 6 deletions packages/babel-preset-gatsby-package/lib/__tests__/index.js
Expand Up @@ -38,7 +38,7 @@ describe(`babel-preset-gatsby-package`, () => {
},
},
],
"babel-plugin-lodash",
"@sigmacomputing/babel-plugin-lodash",
]
`)
})
Expand All @@ -63,7 +63,7 @@ describe(`babel-preset-gatsby-package`, () => {
},
},
],
"babel-plugin-lodash",
"@sigmacomputing/babel-plugin-lodash",
]
`)
})
Expand Down Expand Up @@ -111,7 +111,7 @@ describe(`babel-preset-gatsby-package`, () => {
},
},
],
"babel-plugin-lodash",
"@sigmacomputing/babel-plugin-lodash",
]
`)
})
Expand All @@ -136,7 +136,7 @@ describe(`babel-preset-gatsby-package`, () => {
},
},
],
"babel-plugin-lodash",
"@sigmacomputing/babel-plugin-lodash",
]
`)
})
Expand All @@ -163,7 +163,7 @@ describe(`babel-preset-gatsby-package`, () => {
},
},
],
"babel-plugin-lodash",
"@sigmacomputing/babel-plugin-lodash",
]
`)
})
Expand All @@ -188,7 +188,7 @@ describe(`babel-preset-gatsby-package`, () => {
},
},
],
"babel-plugin-lodash",
"@sigmacomputing/babel-plugin-lodash",
]
`)
})
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby-package/lib/index.js
Expand Up @@ -86,7 +86,7 @@ function preset(context, options = {}) {
availableFlags: availableCompilerFlags,
},
],
r(`babel-plugin-lodash`),
r(`@sigmacomputing/babel-plugin-lodash`),
Array.isArray(keepDynamicImports) && keepDynamicImports.length > 0 && [
r(`./babel-transform-mark-to-keep-dynamic-import`),
{
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby-package/package.json
Expand Up @@ -19,7 +19,7 @@
"@babel/preset-react": "^7.18.6",
"@babel/runtime": "^7.20.13",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-lodash": "^3.3.4",
"@sigmacomputing/babel-plugin-lodash": "^3.3.5",
"core-js": "^3.31.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-cli/package.json
Expand Up @@ -61,7 +61,7 @@
"@rollup/plugin-replace": "^2.4.2",
"@types/hosted-git-info": "^3.0.5",
"@types/yargs": "^15.0.19",
"babel-plugin-lodash": "^3.3.4",
"@sigmacomputing/babel-plugin-lodash": "^3.3.5",
"babel-preset-gatsby-package": "^3.13.0",
"cross-env": "^7.0.3",
"ink": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-cli/rollup.config.js
Expand Up @@ -59,7 +59,7 @@ export default {
],
"@babel/preset-react"
],
plugins: ["@babel/plugin-transform-runtime", "babel-plugin-lodash"],
plugins: ["@babel/plugin-transform-runtime", "@sigmacomputing/babel-plugin-lodash"],
overrides: [
{
"test": ["**/*.ts", "**/*.tsx"],
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-lodash/package.json
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"babel-plugin-lodash": "^3.3.4",
"@sigmacomputing/babel-plugin-lodash": "^3.3.5",
"lodash-webpack-plugin": "^0.11.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-lodash/src/gatsby-node.js
Expand Up @@ -38,6 +38,6 @@ exports.onCreateWebpackConfig = (
// Add Lodash Babel plugin
exports.onCreateBabelConfig = ({ actions }) => {
actions.setBabelPlugin({
name: `babel-plugin-lodash`,
name: require.resolve(`@sigmacomputing/babel-plugin-lodash`),
})
}
2 changes: 1 addition & 1 deletion packages/gatsby/package.json
Expand Up @@ -47,7 +47,7 @@
"babel-loader": "^8.3.0",
"babel-plugin-add-module-exports": "^1.0.4",
"babel-plugin-dynamic-import-node": "^2.3.3",
"babel-plugin-lodash": "^3.3.4",
"@sigmacomputing/babel-plugin-lodash": "^3.3.5",
"babel-plugin-remove-graphql-queries": "^5.13.0",
"babel-preset-gatsby": "^3.13.0",
"better-opn": "^2.1.1",
Expand Down
Expand Up @@ -3,7 +3,7 @@ const path = require(`path`)
exports.onCreateBabelConfig = ({ actions }) => {
// rewrites import { get }from 'lodash' into import get from 'lodash/get';
actions.setBabelPlugin({
name: `babel-plugin-lodash`,
name: `@sigmacomputing/babel-plugin-lodash`,
})
}

Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Expand Up @@ -422,7 +422,7 @@
dependencies:
"@babel/types" "^7.20.7"

"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.0.0-beta.49", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6":
"@babel/helper-module-imports@^7.0.0", "@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e"
integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==
Expand Down Expand Up @@ -1390,7 +1390,7 @@
debug "^4.1.0"
globals "^11.1.0"

"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.12.1", "@babel/types@^7.12.7", "@babel/types@^7.16.8", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.2.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
"@babel/types@^7.0.0", "@babel/types@^7.12.1", "@babel/types@^7.12.7", "@babel/types@^7.16.8", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.2.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f"
integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg==
Expand Down Expand Up @@ -4247,6 +4247,17 @@
resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df"
integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==

"@sigmacomputing/babel-plugin-lodash@^3.3.5":
version "3.3.5"
resolved "https://registry.yarnpkg.com/@sigmacomputing/babel-plugin-lodash/-/babel-plugin-lodash-3.3.5.tgz#613d98b0cbb51c1836bbc12c8a12d75750ee3510"
integrity sha512-VFhaHjlNzWyBtBm3YdqOwP8GbQHK7sWzXKpSUBTLjl2Zz6/9PwCK4qXZXI5CHpDjmvbouHUDbjrZP2KU5h6VQg==
dependencies:
"@babel/helper-module-imports" "^7.0.0"
"@babel/types" "^7.0.0"
glob "^7.1.1"
lodash "^4.17.10"
require-package-name "^2.0.1"

"@sinclair/typebox@^0.25.16":
version "0.25.21"
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.25.21.tgz#763b05a4b472c93a8db29b2c3e359d55b29ce272"
Expand Down Expand Up @@ -6627,17 +6638,6 @@ babel-plugin-jest-hoist@^29.5.0:
"@types/babel__core" "^7.1.14"
"@types/babel__traverse" "^7.0.6"

babel-plugin-lodash@^3.3.4:
version "3.3.4"
resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.3.4.tgz#4f6844358a1340baed182adbeffa8df9967bc196"
integrity sha512-yDZLjK7TCkWl1gpBeBGmuaDIFhZKmkoL+Cu2MUUjv5VxUZx/z7tBGBCBcQs5RI1Bkz5LLmNdjx7paOyQtMovyg==
dependencies:
"@babel/helper-module-imports" "^7.0.0-beta.49"
"@babel/types" "^7.0.0-beta.49"
glob "^7.1.1"
lodash "^4.17.10"
require-package-name "^2.0.1"

babel-plugin-macros@^2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138"
Expand Down

0 comments on commit c9f8c24

Please sign in to comment.