Socket
Socket
Sign inDemoInstall

release-plan

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

release-plan - npm Package Compare versions

Comparing version 0.6.0 to 0.6.1

fixtures/pnpm/multi-lockfile/package.json

12

.release-plan.json
{
"solution": {
"release-plan": {
"impact": "minor",
"oldVersion": "0.5.1",
"newVersion": "0.6.0",
"impact": "patch",
"oldVersion": "0.6.0",
"newVersion": "0.6.1",
"constraints": [
{
"impact": "minor",
"reason": "Appears in changelog section :rocket: Enhancement"
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}

@@ -16,3 +16,3 @@ ],

},
"description": "## Release (2023-12-13)\n\nrelease-plan 0.6.0 (minor)\n\n#### :rocket: Enhancement\n* `release-plan`\n * [#38](https://github.com/embroider-build/release-plan/pull/38) add --publish-branch if passed to release-plan publish ([@mansona](https://github.com/mansona))\n\n#### Committers: 1\n- Chris Manson ([@mansona](https://github.com/mansona))\n"
"description": "## Release (2024-01-24)\n\nrelease-plan 0.6.1 (patch)\n\n#### :bug: Bug Fix\n* `release-plan`\n * [#47](https://github.com/embroider-build/release-plan/pull/47) Robustly discover packages with @manypkg ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 1\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
}
# release-plan Changelog
## Release (2024-01-24)
release-plan 0.6.1 (patch)
#### :bug: Bug Fix
* `release-plan`
* [#47](https://github.com/embroider-build/release-plan/pull/47) Robustly discover packages with @manypkg ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
#### Committers: 1
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)
## Release (2023-12-13)

@@ -3,0 +13,0 @@

@@ -1,5 +0,5 @@

import { resolve, relative, join } from 'path';
import { relative, join } from 'path';
import fsExtra from 'fs-extra';
import execa from 'execa';
const { readJSONSync, existsSync } = fsExtra;
import { getPackagesSync } from '@manypkg/get-packages';
const { readJSONSync } = fsExtra;
export function getPackages(rootDir) {

@@ -20,20 +20,7 @@ const packages = new Map();

}
if (!existsSync(join(rootDir, './pnpm-workspace.yaml'))) {
const result = execa.sync('npm', ['query', '.workspace'], { cwd: rootDir });
const resultParsed = JSON.parse(result.stdout);
const locations = resultParsed.map((i) => i.location);
for (const location of locations) {
loadPackage(resolve(location, 'package.json'));
}
loadPackage(join(rootDir, './package.json'));
const { packages: workspaces, rootPackage } = getPackagesSync(rootDir);
workspaces.forEach((item) => loadPackage(join(item.dir, 'package.json')));
if (rootPackage?.dir) {
loadPackage(join(rootPackage.dir, 'package.json'));
}
else {
const result = execa.sync(`pnpm`, ['m', 'ls', '--json', '--depth=-1'], {
cwd: rootDir,
});
const workspaceJson = JSON.parse(result.stdout);
workspaceJson
.filter((item) => item.name && item.path)
.forEach((item) => loadPackage(join(item.path, 'package.json')));
}
return packages;

@@ -40,0 +27,0 @@ }

{
"name": "release-plan",
"version": "0.6.0",
"version": "0.6.1",
"description": "",

@@ -15,3 +15,4 @@ "keywords": [],

"dependencies": {
"@ef4/lerna-changelog": "^2.0.0",
"@ef4/lerna-changelog": "^2.1.0",
"@manypkg/get-packages": "^2.2.0",
"@npmcli/package-json": "^5.0.0",

@@ -18,0 +19,0 @@ "@octokit/rest": "^19.0.8",

@@ -57,3 +57,91 @@ import { describe, it, expect } from 'vitest';

});
describe('pnpm/fixtures/single-package', function () {
it('can load the workspaces', function () {
const answer = getPackages('./fixtures/pnpm/single-package');
expect(Array(...answer.keys())).toMatchInlineSnapshot(`
[
"foo-package",
]
`);
expect(answer.get('foo-package')).toMatchInlineSnapshot(
{
pkg: expect.any(Object),
version: expect.any(String),
},
`
{
"isDependencyOf": Map {},
"isPeerDependencyOf": Map {},
"pkg": Any<Object>,
"pkgJSONPath": "./fixtures/pnpm/single-package/package.json",
"version": Any<String>,
}
`,
);
});
});
describe('pnpm/fixtures/multi-lockfile', function () {
it('can load the workspaces', function () {
const answer = getPackages('./fixtures/pnpm/multi-lockfile');
expect(Array(...answer.keys())).toMatchInlineSnapshot(`
[
"a",
"b",
"c",
]
`);
expect(answer.get('a')).toMatchInlineSnapshot(
{
pkg: expect.any(Object),
version: expect.any(String),
},
`
{
"isDependencyOf": Map {},
"isPeerDependencyOf": Map {},
"pkg": Any<Object>,
"pkgJSONPath": "./fixtures/pnpm/multi-lockfile/packages/a/package.json",
"version": Any<String>,
}
`,
);
expect(answer.get('b')).toMatchInlineSnapshot(
{
pkg: expect.any(Object),
version: expect.any(String),
},
`
{
"isDependencyOf": Map {},
"isPeerDependencyOf": Map {},
"pkg": Any<Object>,
"pkgJSONPath": "./fixtures/pnpm/multi-lockfile/packages/b/package.json",
"version": Any<String>,
}
`,
);
expect(answer.get('c')).toMatchInlineSnapshot(
{
pkg: expect.any(Object),
version: expect.any(String),
},
`
{
"isDependencyOf": Map {},
"isPeerDependencyOf": Map {},
"pkg": Any<Object>,
"pkgJSONPath": "./fixtures/pnpm/multi-lockfile/packages/c/package.json",
"version": Any<String>,
}
`,
);
});
});
});
});

@@ -1,6 +0,6 @@

import { resolve, relative, join } from 'path';
import { relative, join } from 'path';
import fsExtra from 'fs-extra';
import execa from 'execa';
import { getPackagesSync } from '@manypkg/get-packages';
const { readJSONSync, existsSync } = fsExtra;
const { readJSONSync } = fsExtra;
export type Range = `workspace:${string}`;

@@ -34,22 +34,9 @@

if (!existsSync(join(rootDir, './pnpm-workspace.yaml'))) {
const result = execa.sync('npm', ['query', '.workspace'], { cwd: rootDir });
const resultParsed = JSON.parse(result.stdout);
const locations = resultParsed.map((i: any) => i.location);
const { packages: workspaces, rootPackage } = getPackagesSync(rootDir);
for (const location of locations) {
loadPackage(resolve(location, 'package.json'));
}
workspaces.forEach((item) => loadPackage(join(item.dir, 'package.json')));
if (rootPackage?.dir) {
loadPackage(join(rootPackage.dir, 'package.json'));
}
loadPackage(join(rootDir, './package.json'));
} else {
const result = execa.sync(`pnpm`, ['m', 'ls', '--json', '--depth=-1'], {
cwd: rootDir,
});
const workspaceJson = JSON.parse(result.stdout);
workspaceJson
.filter((item: any) => item.name && item.path)
.forEach((item: any) => loadPackage(join(item.path, 'package.json')));
}
return packages;

@@ -56,0 +43,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc