Pipe library / npm-new-versions
npm-new-versions
New versions of an npm package since the last successful run.
Developer monitoring
registry.npmjs.org
CLI
pipes run examples/npm-new-versions.pipe.yaml
MCP call
{
"name": "pipe__npm-new-versions",
"arguments": {}
}
Pipe file
examples/npm-new-versions.pipe.yaml
pipes: 0
name: npm-new-versions
version: 0.1.0
description: New versions of an npm package since the last successful run.
permissions:
network: [registry.npmjs.org]
inputs:
type: object
properties:
package:
type: string
pattern: "^[A-Za-z0-9._@/-]+$"
default: left-pad
required: [package]
outputs:
type: object
properties:
text: { type: string }
count: { type: integer }
required: [text, count]
output:
text: "${steps.format.text}"
count: "${steps.format.count}"
steps:
- id: fetch
block: fetch_http
with:
url: "https://registry.npmjs.org/${inputs.package}"
max_bytes: 2000000
retry: { max: 2, backoff_ms: 500 }
timeout_ms: 15000
- id: versions
block: parse_json
in: "${steps.fetch}"
with:
path: versions
entries: true
- id: shaped
block: map
in: "${steps.versions}"
with:
set:
version: "${item.key}"
package: "${inputs.package}"
pick: [version, package]
- id: new
block: diff_since_last
in: "${steps.shaped}"
with:
key: [package, version]
compare: [version]
emit: [added]
first_run: all
- id: capped
block: limit
in: "${steps.new}"
with: { n: 20 }
- id: format
block: format
in: "${steps.capped}"
with:
header: "npm versions:\n"
item_template: "- ${item.package}@${item.version}"
separator: "\n"
- id: print
block: emit_stdout
in: "${steps.format.text}"
with: { format: text }