Skip to content

Commit 855d61e

Browse files
committed
chore: deprecate plugin.makeHigher
1 parent 73e3c99 commit 855d61e

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

packages/plugin-monorepo/src/monorepo-plugin.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ export const monorepo = <M extends Monorepo<any, any>>(
1616
plugin.switchMake((monad, context, monad$) =>
1717
plugin.pipe(
1818
find(pathGlobs),
19-
plugin.makeHigher(
20-
plugin.of(undefined),
21-
plugin.map(({ files }) => find(files.map((file) => `${file.path}/package.json`))),
22-
),
19+
plugin.switchMake(({ files }) => find(files.map((file) => `${file.path}/package.json`))),
2320
read(),
2421
jsonParse(),
2522
plugin.map(({ files }) => {

packages/plugin-monorepo/src/project.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,7 @@ export class Project<C extends BaseProjectContext, TASKS extends BaseProjectTask
166166
plugin.warn(`Warning: "sourcePaths" task is not implemented for project ${this.name}. Returning none.`),
167167
),
168168
),
169-
plugin.makeHigher(
170-
plugin.of(undefined),
171-
plugin.map((sourcePaths) => findOrWatch(gc.watchMode, sourcePaths)),
172-
),
169+
plugin.switchMake((sourcePaths) => findOrWatch(gc.watchMode, sourcePaths)),
173170
read(),
174171
),
175172
);

packages/plugin/src/plugin.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ plugin.make = <I, O>(pluginMaker: HarkPluginMaker<I, O>): HarkPlugin<I, O> => {
140140
*/
141141
plugin.init = plugin.make;
142142

143-
/** HarkPlugin: Wraps a higher-ordered-plugin (which returns another plugin) */
143+
/**
144+
* HarkPlugin: Wraps a higher-ordered-plugin (which returns another plugin)
145+
* @deprecated Try using plugin.switchMake instead.
146+
*/
144147
plugin.makeHigher = <I1, I2, O>(
145148
thePluginInput: HarkPlugin<I1, I2>,
146149
higherOrderPlugin: HarkPlugin<I1, HarkPlugin<I2, O>>,

tsconfig.base.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"lib": ["esnext"],
1616
"moduleResolution": "node",
1717
"resolveJsonModule": true,
18-
"paths": {},
18+
// "baseUrl": ".",
19+
// "paths": {},
1920

2021
// Build
2122
"composite": true,

0 commit comments

Comments
 (0)