From 2ed45946db27b65cc694c96b9a6dfd66619b4863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kh=E1=BA=A3i?= Date: Sun, 1 Sep 2024 04:16:01 +0700 Subject: [PATCH] test: pin micromatch latest tag (#8484) Resolves https://github.com/pnpm/pnpm/commit/0f5d841fc6748988783c506f6ae048352f2e8d12#commitcomment-146043552 --- .../test/update/interactive.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg-manager/plugin-commands-installation/test/update/interactive.ts b/pkg-manager/plugin-commands-installation/test/update/interactive.ts index cd31524bf8..202e0fe164 100644 --- a/pkg-manager/plugin-commands-installation/test/update/interactive.ts +++ b/pkg-manager/plugin-commands-installation/test/update/interactive.ts @@ -3,7 +3,7 @@ import { filterPackagesFromDir } from '@pnpm/workspace.filter-packages-from-dir' import { type Lockfile } from '@pnpm/lockfile.types' import { add, install, update } from '@pnpm/plugin-commands-installation' import { prepare, preparePackages } from '@pnpm/prepare' -import { REGISTRY_MOCK_PORT } from '@pnpm/registry-mock' +import { REGISTRY_MOCK_PORT, addDistTag } from '@pnpm/registry-mock' import { sync as readYamlFile } from 'read-yaml-file' import chalk from 'chalk' import * as enquirer from 'enquirer' @@ -65,6 +65,11 @@ test('interactively update', async () => { value: '', } + await Promise.all([ + addDistTag({ package: 'is-negative', version: '2.1.0', distTag: 'latest' }), + addDistTag({ package: 'micromatch', version: '4.0.0', distTag: 'latest' }), + ]) + await add.handler( { ...DEFAULT_OPTIONS, @@ -164,7 +169,7 @@ test('interactively update', async () => { name: 'is-positive', }, { - message: chalk`micromatch 3.0.0 ❯ {redBright.bold 4.0.8} `, + message: chalk`micromatch 3.0.0 ❯ {redBright.bold 4.0.0} `, value: 'micromatch', name: 'micromatch', },