From 4adf4b33008888af1dd7828c6d9e931167db44d9 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Sat, 28 Mar 2020 18:43:59 -0600 Subject: [PATCH] lodash.curry --- packages/next/build/webpack/config/blocks/base.ts | 2 +- packages/next/build/webpack/config/blocks/css/index.ts | 2 +- packages/next/build/webpack/config/helpers.ts | 2 +- packages/next/package.json | 2 +- packages/next/taskfile.js | 8 ++++++++ packages/next/types/misc.d.ts | 4 ++++ 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/packages/next/build/webpack/config/blocks/base.ts b/packages/next/build/webpack/config/blocks/base.ts index 8d30f3305e..9d71b43195 100644 --- a/packages/next/build/webpack/config/blocks/base.ts +++ b/packages/next/build/webpack/config/blocks/base.ts @@ -1,4 +1,4 @@ -import curry from 'lodash.curry' +import curry from 'next/dist/compiled/lodash.curry' import { Configuration } from 'webpack' import { ConfigurationContext } from '../utils' diff --git a/packages/next/build/webpack/config/blocks/css/index.ts b/packages/next/build/webpack/config/blocks/css/index.ts index 85989207bf..418b5c170b 100644 --- a/packages/next/build/webpack/config/blocks/css/index.ts +++ b/packages/next/build/webpack/config/blocks/css/index.ts @@ -1,4 +1,4 @@ -import curry from 'lodash.curry' +import curry from 'next/dist/compiled/lodash.curry' import path from 'path' import webpack, { Configuration } from 'webpack' import MiniCssExtractPlugin from '../../../plugins/mini-css-extract-plugin' diff --git a/packages/next/build/webpack/config/helpers.ts b/packages/next/build/webpack/config/helpers.ts index ce0a49f0ea..67edf14648 100644 --- a/packages/next/build/webpack/config/helpers.ts +++ b/packages/next/build/webpack/config/helpers.ts @@ -1,4 +1,4 @@ -import curry from 'lodash.curry' +import curry from 'next/dist/compiled/lodash.curry' import { Configuration, Plugin, RuleSetRule } from 'webpack' export const loader = curry(function loader( diff --git a/packages/next/package.json b/packages/next/package.json index cc4a9f5d35..9729448598 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -72,7 +72,6 @@ "ignore-loader": "0.1.2", "jest-worker": "24.9.0", "loader-utils": "2.0.0", - "lodash.curry": "4.1.1", "lru-cache": "5.1.1", "mini-css-extract-plugin": "0.8.0", "native-url": "0.2.6", @@ -193,6 +192,7 @@ "json5": "2.1.2", "jsonwebtoken": "8.5.1", "launch-editor": "2.2.1", + "lodash.curry": "4.1.1", "nanoid": "2.0.3", "resolve": "1.11.0", "taskr": "1.1.0", diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index 301b2a3ce5..4d03e9c117 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -387,6 +387,13 @@ export async function ncc_launch_editor(task, opts) { .target('dist/compiled/launch-editor') } // eslint-disable-next-line camelcase +export async function ncc_lodash_curry(task, opts) { + await task + .source(opts.src || relative(__dirname, require.resolve('lodash.curry'))) + .ncc({ packageName: 'lodash.curry' }) + .target('dist/compiled/lodash.curry') +} +// eslint-disable-next-line camelcase export async function ncc_nanoid(task, opts) { await task .source(opts.src || relative(__dirname, require.resolve('nanoid'))) @@ -460,6 +467,7 @@ export async function precompile(task) { 'ncc_json5', 'ncc_jsonwebtoken', 'ncc_launch_editor', + 'ncc_lodash_curry', 'ncc_nanoid', 'ncc_resolve', 'ncc_text_table', diff --git a/packages/next/types/misc.d.ts b/packages/next/types/misc.d.ts index b5c90e0ea1..c767613c25 100644 --- a/packages/next/types/misc.d.ts +++ b/packages/next/types/misc.d.ts @@ -128,6 +128,10 @@ declare module 'next/dist/compiled/launch-editor' { import m from 'launch-editor' export = m } +declare module 'next/dist/compiled/lodash.curry' { + import m from 'lodash.curry' + export = m +} declare module 'next/dist/compiled/nanoid/index.js' { function nanoid(size?: number): string export = nanoid -- GitLab