Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antfu-collective/ni
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.21.5
Choose a base ref
...
head repository: antfu-collective/ni
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.21.6
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Aug 23, 2023

  1. Copy the full SHA
    63b6a88 View commit details
  2. chore: update deps

    antfu committed Aug 23, 2023
    Copy the full SHA
    4e97fdf View commit details
  3. chore: release v0.21.6

    antfu committed Aug 23, 2023

    Partially verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    4fef03b View commit details
Showing with 977 additions and 563 deletions.
  1. +5 −1 build.config.ts
  2. +14 −14 package.json
  3. +952 −542 pnpm-lock.yaml
  4. +2 −2 src/agents.ts
  5. +4 −4 test/programmatic/__snapshots__/runCli.spec.ts.snap
6 changes: 5 additions & 1 deletion build.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import { basename } from 'node:path'
import { defineBuildConfig } from 'unbuild'
import fg from 'fast-glob'

export default defineBuildConfig({
entries: [
...fg.sync('src/commands/*.ts').map(i => i.slice(0, -3)),
...fg.sync('src/commands/*.ts').map(i => ({
input: i.slice(0, -3),
name: basename(i).slice(0, -3),
})),
],
clean: true,
declaration: true,
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@antfu/ni",
"type": "module",
"version": "0.21.5",
"packageManager": "pnpm@8.6.8",
"version": "0.21.6",
"packageManager": "pnpm@8.6.12",
"description": "Use the right package manager",
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
"license": "MIT",
@@ -17,13 +17,13 @@
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"import": "./dist/index.mjs"
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"bin": {
"ni": "bin/ni.mjs",
"nci": "bin/nci.mjs",
@@ -48,17 +48,17 @@
"test": "vitest"
},
"devDependencies": {
"@antfu/eslint-config": "^0.39.8",
"@antfu/eslint-config": "^0.40.2",
"@posva/prompts": "^2.4.4",
"@types/fs-extra": "^11.0.1",
"@types/ini": "^1.3.31",
"@types/node": "^20.4.2",
"@types/node": "^20.5.3",
"@types/which": "^3.0.0",
"bumpp": "^9.1.1",
"eslint": "^8.45.0",
"bumpp": "^9.2.0",
"eslint": "^8.47.0",
"esno": "^0.17.0",
"execa": "^7.1.1",
"fast-glob": "^3.3.0",
"fast-glob": "^3.3.1",
"find-up": "^6.3.0",
"fs-extra": "^11.1.1",
"fzf": "^0.5.2",
@@ -67,8 +67,8 @@
"rimraf": "^5.0.1",
"terminal-link": "^3.0.0",
"typescript": "^5.1.6",
"unbuild": "^1.2.1",
"vitest": "^0.33.0",
"unbuild": "^2.0.0",
"vitest": "^0.34.2",
"which": "^3.0.1"
},
"eslintConfig": {
1,494 changes: 952 additions & 542 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/agents.ts
Original file line number Diff line number Diff line change
@@ -39,8 +39,8 @@ const bun = {
'frozen': 'bun install --no-save',
'global': 'bun add -g {0}',
'add': 'bun add {0}',
'upgrade': null,
'upgrade-interactive': null,
'upgrade': 'bun update {0}',
'upgrade-interactive': 'bun update {0}',
'execute': 'bunx {0}',
'uninstall': 'bun remove {0}',
'global_uninstall': 'bun remove -g {0}',
8 changes: 4 additions & 4 deletions test/programmatic/__snapshots__/runCli.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -16,9 +16,9 @@ exports[`lockfile > bun > ni foo 1`] = `"bun add foo"`;

exports[`lockfile > bun > nlx 1`] = `"bunx foo"`;

exports[`lockfile > bun > nu -i 1`] = `"Command \\"upgrade-interactive\\" is not support by agent \\"bun\\""`;
exports[`lockfile > bun > nu -i 1`] = `"bun update"`;

exports[`lockfile > bun > nu 1`] = `"Command \\"upgrade\\" is not support by agent \\"bun\\""`;
exports[`lockfile > bun > nu 1`] = `"bun update"`;

exports[`lockfile > bun > nun -g foo 1`] = `"bun remove -g foo"`;

@@ -184,9 +184,9 @@ exports[`packager > bun > ni foo 1`] = `"bun add foo"`;

exports[`packager > bun > nlx 1`] = `"bunx foo"`;

exports[`packager > bun > nu -i 1`] = `"Command \\"upgrade-interactive\\" is not support by agent \\"bun\\""`;
exports[`packager > bun > nu -i 1`] = `"bun update"`;

exports[`packager > bun > nu 1`] = `"Command \\"upgrade\\" is not support by agent \\"bun\\""`;
exports[`packager > bun > nu 1`] = `"bun update"`;

exports[`packager > bun > nun -g foo 1`] = `"bun remove -g foo"`;