-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE: remove esm module and use native ESM module convention
- Loading branch information
Showing
27 changed files
with
3,334 additions
and
7,785 deletions.
There are no files selected for viewing
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,14 +1,13 @@ | ||
#!/usr/bin/env node | ||
const commander = require("commander"); | ||
const {runCommand, commands} = require("../src/index.js"); | ||
|
||
commander | ||
.usage("monorepo build [options]") | ||
.option("-v, --verbose", "Enable verbose log", (v, t) => t + 1, 0) | ||
.parse(process.argv); | ||
|
||
(() => { | ||
const {commands, runCommand} = import("../src"); | ||
(async () => { | ||
const {commands, runCommand} = await import("../src/index.js"); | ||
|
||
runCommand(commands.BuildCmd, commander.opts()); | ||
})(); |
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "commonjs" | ||
} |
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,37 +1,36 @@ | ||
const {MonoRepo} = require("./src"); | ||
import {MonoRepo} from "./src/index.js"; | ||
|
||
/** | ||
* @type {MonoRepo} | ||
*/ | ||
let monoRepo; | ||
|
||
module.exports = { | ||
async verifyConditions(pluginConfig, context) { | ||
monoRepo = new MonoRepo({ | ||
rootDir: context.cwd | ||
}); | ||
export async function verifyConditions(pluginConfig, context) { | ||
monoRepo = new MonoRepo({ | ||
rootDir: context.cwd | ||
}); | ||
|
||
await monoRepo.configureWorkspace({ | ||
dryRun: pluginConfig.dryRun | ||
}); | ||
}, | ||
await monoRepo.configureWorkspace({ | ||
dryRun: pluginConfig.dryRun | ||
}); | ||
} | ||
|
||
async prepare(pluginConfig, context) { | ||
const { | ||
nextRelease: {version} | ||
} = context; | ||
export async function prepare(pluginConfig, context) { | ||
const { | ||
nextRelease: {version} | ||
} = context; | ||
|
||
await monoRepo.newVersion({version}); | ||
await monoRepo.build("workspace"); | ||
await monoRepo.commitChanges({version}); | ||
}, | ||
await monoRepo.newVersion({version}); | ||
await monoRepo.build("workspace"); | ||
await monoRepo.commitChanges({version}); | ||
} | ||
|
||
async publish(pluginConfig) { | ||
return monoRepo.publish("packages", {dryRun: pluginConfig.dryRun}); | ||
}, | ||
export async function publish(pluginConfig) { | ||
return monoRepo.publish("packages", {dryRun: pluginConfig.dryRun}); | ||
} | ||
|
||
async success(pluginConfig) { | ||
if (!pluginConfig.dryRun) { | ||
return monoRepo.sync("repository"); | ||
} | ||
export async function success(pluginConfig) { | ||
if (!pluginConfig.dryRun) { | ||
return monoRepo.sync("repository"); | ||
} | ||
}; | ||
} |
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 @@ | ||
export * from "./clean/CleanCmd"; | ||
export * from "./build/BuildCmd"; | ||
export * from "./version/VersionCmd"; | ||
export * from "./publish/PublishCmd"; | ||
export * from "./sync/SyncCmd"; | ||
export * from "./ci/CICmd"; | ||
export * from "./clean/CleanCmd.js"; | ||
export * from "./build/BuildCmd.js"; | ||
export * from "./version/VersionCmd.js"; | ||
export * from "./publish/PublishCmd.js"; | ||
export * from "./sync/SyncCmd.js"; | ||
export * from "./ci/CICmd.js"; |
Oops, something went wrong.