@mokr/core
Advanced tools
Comparing version 1.8.1 to 2.0.0
@@ -10,2 +10,3 @@ export * from "./directory.js"; | ||
export * from "./repo.js"; | ||
export * from "./tasks.js"; | ||
export * from "./template.js"; | ||
@@ -12,0 +13,0 @@ export * from "./utils/index.js"; |
@@ -44,4 +44,5 @@ import { isMonorepo } from "./monorepo.js"; | ||
if (CORE_PLUGINS.includes(name)) { | ||
// @ts-ignore | ||
const plugins = await import("@mokr/plugins"); | ||
// Workaround to prevent TS5055 errors | ||
const packageName = "@mokr/plugins"; | ||
const plugins = await import(packageName); | ||
plugin = plugins[toCamelCase(name)]; | ||
@@ -48,0 +49,0 @@ } |
@@ -24,4 +24,5 @@ import { PluginType, validateType } from "./plugin.js"; | ||
if (CORE_TEMPLATES.includes(name)) { | ||
// @ts-ignore | ||
const templates = await import("@mokr/templates"); | ||
// Workaround to prevent TS5055 errors | ||
const packageName = "@mokr/templates"; | ||
const templates = await import(packageName); | ||
template = templates[toCamelCase(name)]; | ||
@@ -28,0 +29,0 @@ } |
import { task } from "../io.js"; | ||
import { installPlugin as coreInstallPlugin, hasPlugin, loadAllPlugins, } from "../plugin.js"; | ||
import { applyTemplate } from "../template.js"; | ||
import { getMonorepoDirectory } from "../workspace.js"; | ||
import { runDependencyQueues } from "../yarn.js"; | ||
@@ -37,3 +38,7 @@ import { exec } from "./exec.js"; | ||
export async function updateDependenciesTask({ directory }) { | ||
await task(`Update dependencies`, () => runDependencyQueues({ directory })); | ||
const monorepoDirectory = await getMonorepoDirectory({ directory }); | ||
await task(`Update${monorepoDirectory ? " workspace" : ""} dependencies`, () => runDependencyQueues({ directory })); | ||
if (monorepoDirectory) { | ||
await task(`Update monorepo dependencies`, () => runDependencyQueues({ directory: monorepoDirectory })); | ||
} | ||
} |
{ | ||
"name": "@mokr/core", | ||
"version": "1.8.1", | ||
"version": "2.0.0", | ||
"description": "Core moker functions", | ||
@@ -9,4 +9,6 @@ "repository": "https://github.com/hongaar/moker", | ||
"type": "module", | ||
"main": "dist/index.js", | ||
"types": "types/index.d.ts", | ||
"exports": { | ||
"import": "./dist/index.js", | ||
"types": "./types/index.d.ts" | ||
}, | ||
"files": [ | ||
@@ -17,5 +19,5 @@ "dist", | ||
"scripts": { | ||
"build": "yarn clean && tsc", | ||
"build:watch": "tsc --watch", | ||
"clean": "rm -rf dist && rm -rf types", | ||
"build": "yarn build:clean && tsc --build --force", | ||
"build:watch": "tsc --build --watch", | ||
"build:clean": "tsc --build --clean", | ||
"prepublish": "yarn build", | ||
@@ -22,0 +24,0 @@ "test": "NODE_OPTIONS='--loader=ts-node/esm --no-warnings' node --test test/*.test.ts" |
@@ -10,2 +10,3 @@ export * from "./directory.js"; | ||
export * from "./repo.js"; | ||
export * from "./tasks.js"; | ||
export * from "./template.js"; | ||
@@ -12,0 +13,0 @@ export * from "./utils/index.js"; |
@@ -23,2 +23,10 @@ import type { Undefinable } from "./utils/types.js"; | ||
type?: "module" | "commonjs"; | ||
exports?: { | ||
import?: string; | ||
types?: string; | ||
require?: string; | ||
node?: string; | ||
default?: string; | ||
[k: string]: string | undefined; | ||
}; | ||
files?: string[]; | ||
@@ -25,0 +33,0 @@ main?: string; |
@@ -1,2 +0,2 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" resolution-mode="require"/> | ||
export declare function exec(cmd: string, args?: string[], { cwd, env, io, }?: { | ||
@@ -3,0 +3,0 @@ cwd?: string | undefined; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
68586
77
1466