fix(release): keep platform packages linked in workspace lockfile
This commit is contained in:
parent
2063716def
commit
6e58191e64
|
|
@ -116,15 +116,20 @@ jobs:
|
|||
|
||||
const lockPath = "pnpm-lock.yaml";
|
||||
let lockfile = fs.readFileSync(lockPath, "utf8");
|
||||
for (const dependency of Object.keys(mcpPackage.optionalDependencies ?? {})) {
|
||||
const updateLockDependency = (dependency, packageDirectory) => {
|
||||
const escapedDependency = dependency.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
const specifierPattern = new RegExp(`('${escapedDependency}':\\n\\s+specifier: )[^\\n]+`);
|
||||
lockfile = lockfile.replace(specifierPattern, `$1${version}`);
|
||||
const dependencyPattern = new RegExp(`('${escapedDependency}':\\n\\s+specifier: )[^\\n]+(\\n\\s+version: )([^\\n]+)`);
|
||||
const updated = lockfile.replace(dependencyPattern, `$1${version}$2link:../${packageDirectory}`);
|
||||
if (updated === lockfile) {
|
||||
throw new Error(`Unable to update ${dependency} in pnpm-lock.yaml.`);
|
||||
}
|
||||
lockfile = updated;
|
||||
};
|
||||
for (const dependency of Object.keys(mcpPackage.optionalDependencies ?? {})) {
|
||||
updateLockDependency(dependency, dependency.replace("@dbx-app/", ""));
|
||||
}
|
||||
for (const dependency of Object.keys(cliPackage.optionalDependencies ?? {})) {
|
||||
const escapedDependency = dependency.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
const specifierPattern = new RegExp(`('${escapedDependency}':\\n\\s+specifier: )[^\\n]+`);
|
||||
lockfile = lockfile.replace(specifierPattern, `$1${version}`);
|
||||
updateLockDependency(dependency, dependency.replace("@dbx-app/", ""));
|
||||
}
|
||||
fs.writeFileSync(lockPath, lockfile);
|
||||
|
||||
|
|
@ -153,6 +158,9 @@ jobs:
|
|||
- name: Update Rust lockfile
|
||||
run: cargo check -p dbx-mcp -p dbx-cli --no-default-features
|
||||
|
||||
- name: Verify workspace lockfile
|
||||
run: pnpm install --frozen-lockfile --lockfile-only --ignore-scripts
|
||||
|
||||
- name: Run package tests
|
||||
run: pnpm test:packages
|
||||
|
||||
|
|
|
|||
102
pnpm-lock.yaml
102
pnpm-lock.yaml
|
|
@ -299,22 +299,22 @@ importers:
|
|||
optionalDependencies:
|
||||
'@dbx-app/mcp-darwin-arm64':
|
||||
specifier: 0.4.35
|
||||
version: 0.4.34
|
||||
version: link:../mcp-darwin-arm64
|
||||
'@dbx-app/mcp-darwin-x64':
|
||||
specifier: 0.4.35
|
||||
version: 0.4.34
|
||||
version: link:../mcp-darwin-x64
|
||||
'@dbx-app/mcp-linux-arm64-gnu':
|
||||
specifier: 0.4.35
|
||||
version: 0.4.34
|
||||
version: link:../mcp-linux-arm64-gnu
|
||||
'@dbx-app/mcp-linux-x64-gnu':
|
||||
specifier: 0.4.35
|
||||
version: 0.4.34
|
||||
version: link:../mcp-linux-x64-gnu
|
||||
'@dbx-app/mcp-win32-arm64':
|
||||
specifier: 0.4.35
|
||||
version: 0.4.34
|
||||
version: link:../mcp-win32-arm64
|
||||
'@dbx-app/mcp-win32-x64':
|
||||
specifier: 0.4.35
|
||||
version: 0.4.34
|
||||
version: link:../mcp-win32-x64
|
||||
|
||||
packages/mcp-win32-arm64: {}
|
||||
|
||||
|
|
@ -551,38 +551,74 @@ packages:
|
|||
'@codemirror/view@6.43.0':
|
||||
resolution: {integrity: sha512-V7ZCLQO3Jus9hzh2jVCCPW3mO4IBMr43O37PqSUYautJSnnJF41YlgLw21x0fLJTYvJ+Vkm6Gp+qKGH9pltgXA==}
|
||||
|
||||
'@dbx-app/mcp-darwin-arm64@0.4.34':
|
||||
resolution: {integrity: sha512-RxxXq5GnBvTxETF3vtT1KQEvVSf2XcTEcSozJJ0wNBt5pfyJPeI3m3xRHrzgKlElmGfFFL191D+Jf0eaM0s0bQ==}
|
||||
'@dbx-app/cli-darwin-arm64@0.4.35':
|
||||
resolution: {integrity: sha512-t4xYEfirHy+fQM8FE1TQl6WAwDdP81ggO3qPGW/ce531jw9wxlQrkj8niSzWyFx47bP4ewSOwti8fVD9ECD/dA==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-darwin-x64@0.4.34':
|
||||
resolution: {integrity: sha512-2DIIh3DsEDijpWyKdKoCG+pa1XCnGTSnUyrPZlDoZ78L0I0trkb0NFCaFmnKiLR5LWJ2ZvPnYvwEmBMbnDnviw==}
|
||||
'@dbx-app/cli-darwin-x64@0.4.35':
|
||||
resolution: {integrity: sha512-eRCMAvyxCcB650fZFR6I40biEonCY8i4guqZuxgelPMfQdoDl17L78ieNd6VlBLyr9F7z5TDOQIsOwyce7+tBg==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-linux-arm64-gnu@0.4.34':
|
||||
resolution: {integrity: sha512-ogI2DnQNAO5cr86GlKfvDIw7/cF27o+PRyn5a7/CXKmBugLtPtN4C8UV0wVkObu1avxuMza/7QpAoDB+v+tCZA==}
|
||||
'@dbx-app/cli-linux-arm64-gnu@0.4.35':
|
||||
resolution: {integrity: sha512-VTKmtizcoOQjK6WLa6E7VoJBbYMqZVkjXOxlGMrotm7to5vas199FDyqMNqXz+jNybOJJ7HnXmZD6Tn97q3qzA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-linux-x64-gnu@0.4.34':
|
||||
resolution: {integrity: sha512-CH+2juzBjlJcsSR8A8KUjE1CPi432v8YQ6nmJ3fDxmqt7THa0NT8vvTmczzy9KBhR9dNkEIZ94qZASuh5okN+g==}
|
||||
'@dbx-app/cli-linux-x64-gnu@0.4.35':
|
||||
resolution: {integrity: sha512-cyEjEiqD+EicImNCZ2sQpCHWnLvyU518lHGdC1+jwUQu2IGwPNPs1FlpyqAl0Ng5/7tnoXbtqLtDjZ0ZN9D4oQ==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-win32-arm64@0.4.34':
|
||||
resolution: {integrity: sha512-sRqH+0yX66t0cqapr110470U7B9JB6M9pVVlfAyIJdeIJZHlPiDi0Kz/+n+7sO1Pbf6W43E7lueE0i4N0u8Sow==}
|
||||
'@dbx-app/cli-win32-arm64@0.4.35':
|
||||
resolution: {integrity: sha512-UvqVllUYWmO4axhLDgRxnlaa/tViZVtB4OHv1qHSyU0Cg3zHpZV15IByiwI9tCfdZpXRYJ7Yi/oqpYhtyIQIGQ==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-win32-x64@0.4.34':
|
||||
resolution: {integrity: sha512-lE3hyvI2oKTxgWaeW0OgLbX9gjIwM2t4OE+icg57QvX+WKHcrwu1p7ZWUoW3DmRO4ngKCG8hA9u9ynSGxWhq+A==}
|
||||
'@dbx-app/cli-win32-x64@0.4.35':
|
||||
resolution: {integrity: sha512-c7kaKQLACIMJsdsRAqGE+IUzMXeid06vWFtwRrhTjmBv8v/A8w/4MAgsw5E0MaV1s9C+fp83DP2qS+m4FJWhiQ==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-darwin-arm64@0.4.35':
|
||||
resolution: {integrity: sha512-Mn54w0iW3jF5HTtFA/lzOGHyR/WXmn7Mphi5r8A8YHnb3RWeVVt05QL80+X3nmWbw87bMBf5htDBrFfODHz8/Q==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-darwin-x64@0.4.35':
|
||||
resolution: {integrity: sha512-rgJAwfK0Z9s7hJtmSusjpX25YSJ4kCxDQHfsKERgK7g6+epu2IEuYRwVGfSuqXfcgsfjREWGa9TgYUfNCmJrUg==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-linux-arm64-gnu@0.4.35':
|
||||
resolution: {integrity: sha512-hvZsN9YvHBwzjSWL5Ork+pvYxpFc5+aIQz9jH5MoLMijZ/sO3+XO2HxPMs5FUKzr16yHJMjD47ts17EU4jZJfA==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-linux-x64-gnu@0.4.35':
|
||||
resolution: {integrity: sha512-Ua0dHFfCMNYT3v78ecno/F3PBnLjGLzSJ/VkxFe8WBWcwSXNdWz9Vxehaypkr1lbCZ1WRet9nENfI6xZgebISw==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-win32-arm64@0.4.35':
|
||||
resolution: {integrity: sha512-FP2E3qT2Uf5UPI4NVKJjgLWBHaXqFIRrTpXRPg40YMDG5rVke3b/bQqf0d87BP9N5ba0P5Vv6ObNZXUuwxygLg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
hasBin: true
|
||||
|
||||
'@dbx-app/mcp-win32-x64@0.4.35':
|
||||
resolution: {integrity: sha512-/hPa3/CetdbeUQFYd50svuesSFZbFjfCDB5DYbPI2i1TUF7kJNnYcobWnBzriO+IqWHm1pQlPTjcFe9xKdovew==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
hasBin: true
|
||||
|
|
@ -4541,22 +4577,40 @@ snapshots:
|
|||
style-mod: 4.1.3
|
||||
w3c-keyname: 2.2.8
|
||||
|
||||
'@dbx-app/mcp-darwin-arm64@0.4.34':
|
||||
'@dbx-app/cli-darwin-arm64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-darwin-x64@0.4.34':
|
||||
'@dbx-app/cli-darwin-x64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-linux-arm64-gnu@0.4.34':
|
||||
'@dbx-app/cli-linux-arm64-gnu@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-linux-x64-gnu@0.4.34':
|
||||
'@dbx-app/cli-linux-x64-gnu@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-win32-arm64@0.4.34':
|
||||
'@dbx-app/cli-win32-arm64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-win32-x64@0.4.34':
|
||||
'@dbx-app/cli-win32-x64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-darwin-arm64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-darwin-x64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-linux-arm64-gnu@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-linux-x64-gnu@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-win32-arm64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dbx-app/mcp-win32-x64@0.4.35':
|
||||
optional: true
|
||||
|
||||
'@dotenvx/dotenvx@1.75.1':
|
||||
|
|
|
|||
Loading…
Reference in New Issue