@monodeploy/changelog
Advanced tools
Comparing version 0.7.6 to 0.7.7
@@ -22,6 +22,6 @@ "use strict"; | ||
const workspace = context.project.getWorkspaceByIdent(ident); | ||
const conventionalConfig = await resolveConventionalConfig_1.default({ config }); | ||
const commitsStream = stream_1.Readable.from(commits.map((commit) => `${commit.body}\n-hash-\n${commit.sha}`)).pipe(conventional_commits_parser_1.default(conventionalConfig.parserOpts)); | ||
const conventionalCommits = await io_1.readStream(commitsStream); | ||
const { host, owner, repository, repoUrl } = await git_1.parseRepositoryProperty(workspace); | ||
const conventionalConfig = await (0, resolveConventionalConfig_1.default)({ config }); | ||
const commitsStream = stream_1.Readable.from(commits.map((commit) => `${commit.body}\n-hash-\n${commit.sha}`)).pipe((0, conventional_commits_parser_1.default)(conventionalConfig.parserOpts)); | ||
const conventionalCommits = await (0, io_1.readStream)(commitsStream); | ||
const { host, owner, repository, repoUrl } = await (0, git_1.parseRepositoryProperty)(workspace); | ||
const templateContext = { | ||
@@ -35,8 +35,6 @@ version: newVersion, | ||
currentTag: `${packageName}@${newVersion}`, | ||
previousTag: previousVersion | ||
? `${packageName}@${previousVersion}` | ||
: undefined, | ||
previousTag: previousVersion ? `${packageName}@${previousVersion}` : undefined, | ||
linkCompare: Boolean(previousVersion), | ||
}; | ||
const changelogWriter = conventional_changelog_writer_1.default(templateContext, conventionalConfig.writerOpts); | ||
const changelogWriter = (0, conventional_changelog_writer_1.default)(templateContext, conventionalConfig.writerOpts); | ||
async function* transformedCommits() { | ||
@@ -53,4 +51,4 @@ for (const commit of conventionalCommits) { | ||
const pipeline = stream_1.Readable.from(transformedCommits()).pipe(changelogWriter); | ||
return io_1.readStreamString(pipeline); | ||
return (0, io_1.readStreamString)(pipeline); | ||
}; | ||
exports.default = generateChangelogEntry; |
@@ -1,2 +0,2 @@ | ||
import type { ChangesetSchema, MonodeployConfiguration, YarnContext } from '@monodeploy/types'; | ||
import { ChangesetSchema, MonodeployConfiguration, YarnContext } from '@monodeploy/types'; | ||
import { Workspace } from '@yarnpkg/core'; | ||
@@ -3,0 +3,0 @@ declare const prependChangelogFile: ({ config, context, changeset, workspaces, }: { |
@@ -9,2 +9,3 @@ "use strict"; | ||
const logging_1 = __importDefault(require("@monodeploy/logging")); | ||
const types_1 = require("@monodeploy/types"); | ||
const core_1 = require("@yarnpkg/core"); | ||
@@ -21,8 +22,12 @@ const fslib_1 = require("@yarnpkg/fslib"); | ||
catch (err) { | ||
if (err.code === 'ENOENT') { | ||
logging_1.default.info(`[Changelog] Changelog ${filename} does not exist, creating.`, { report: context.report }); | ||
if ((0, types_1.isNodeError)(err) && err.code === 'ENOENT') { | ||
logging_1.default.info(`[Changelog] Changelog ${filename} does not exist, creating.`, { | ||
report: context.report, | ||
}); | ||
changelogContents = ['# Changelog', '', MARKER]; | ||
} | ||
else { | ||
logging_1.default.error(`[Changelog] Unable to read changelog contents at ${filename}.`, { report: context.report }); | ||
logging_1.default.error(`[Changelog] Unable to read changelog contents at ${filename}.`, { | ||
report: context.report, | ||
}); | ||
throw err; | ||
@@ -41,3 +46,3 @@ } | ||
if (config.dryRun && !config.forceWriteChangeFiles) { | ||
logging_1.default.debug(`[Changelog] Skipping changelog update.`, { | ||
logging_1.default.debug('[Changelog] Skipping changelog update.', { | ||
report: context.report, | ||
@@ -67,3 +72,3 @@ }); | ||
}; | ||
const limit = p_limit_1.default(config.jobs || Infinity); | ||
const limit = (0, p_limit_1.default)(config.jobs || Infinity); | ||
await Promise.all([...workspaces].map((workspace) => limit(() => prependForWorkspace(workspace)))); | ||
@@ -70,0 +75,0 @@ return; |
@@ -19,3 +19,5 @@ "use strict"; | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const conventionalConfigModule = require(require.resolve(conventionalConfig.name, { paths: [config.cwd] })); | ||
const conventionalConfigModule = require(require.resolve(conventionalConfig.name, { | ||
paths: [config.cwd], | ||
})); | ||
return await (typeof conventionalConfigModule === 'function' | ||
@@ -22,0 +24,0 @@ ? conventionalConfigModule(conventionalConfig) |
@@ -15,3 +15,3 @@ "use strict"; | ||
const versionStrategy = versionStrategies.get(packageName); | ||
const changelog = await changelog_1.default({ | ||
const changelog = await (0, changelog_1.default)({ | ||
config, | ||
@@ -33,3 +33,3 @@ context, | ||
if (!config.changesetFilename) { | ||
logging_1.default.debug(`[Changeset] Data`, { | ||
logging_1.default.debug('[Changeset] Data', { | ||
extras: JSON.stringify(changesetData, null, 2), | ||
@@ -36,0 +36,0 @@ report: context.report, |
{ | ||
"name": "@monodeploy/changelog", | ||
"version": "0.7.6", | ||
"version": "0.7.7", | ||
"repository": { | ||
@@ -28,8 +28,8 @@ "type": "git", | ||
"peerDependencies": { | ||
"@monodeploy/git": "^0.3.8", | ||
"@monodeploy/io": "^0.2.20", | ||
"@monodeploy/logging": "^0.1.9", | ||
"@monodeploy/types": "^0.10.1", | ||
"@yarnpkg/core": "^3.0.0", | ||
"@yarnpkg/fslib": "^2.5.0" | ||
"@monodeploy/git": "^0.3.9", | ||
"@monodeploy/io": "^0.2.21", | ||
"@monodeploy/logging": "^0.1.10", | ||
"@monodeploy/types": "^0.10.2", | ||
"@yarnpkg/core": "^3.1.0-rc.3", | ||
"@yarnpkg/fslib": "^2.5.2" | ||
}, | ||
@@ -42,13 +42,14 @@ "dependencies": { | ||
"devDependencies": { | ||
"@monodeploy/git": "0.3.8", | ||
"@monodeploy/io": "0.2.20", | ||
"@monodeploy/logging": "0.1.9", | ||
"@monodeploy/git": "0.3.9", | ||
"@monodeploy/io": "0.2.21", | ||
"@monodeploy/logging": "0.1.10", | ||
"@monodeploy/test-utils": "link:../../testUtils", | ||
"@monodeploy/types": "0.10.1", | ||
"@monodeploy/types": "0.10.2", | ||
"@types/conventional-changelog-writer": "^4.0.0", | ||
"@types/conventional-commits-parser": "^3.0.1", | ||
"@yarnpkg/core": "^3.0.0", | ||
"@yarnpkg/fslib": "^2.5.0" | ||
"@types/node": "^14.17.14", | ||
"@yarnpkg/core": "^3.1.0-rc.3", | ||
"@yarnpkg/fslib": "^2.5.2" | ||
}, | ||
"types": "./lib/index.d.ts" | ||
} |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
21718
276
10