Skip to content

Conversation

@alexsch01
Copy link
Contributor

@alexsch01 alexsch01 commented May 15, 2025

requires #8318 after


needs this PR first: #8278


fixes the case with Invoke-Expression and pipeline input to work

"Line 1", "Line 2", "Line 3" | npm start 

above syntax ONLY works in PowerShell

OUTPUT

 > start > node script.js Processed: Line 1 Processed: Line 2 Processed: Line 3 

given.....

[package.json]

{ "scripts": { "start": "node script.js" } }

[script.js]

const readline = require('readline') const rl = readline.createInterface({ input: process.stdin, output: process.stdout, terminal: false }) rl.on('line', (line) => { console.log(`Processed: ${line}`) })

manually tested with PowerShell

@alexsch01 alexsch01 requested a review from a team as a code owner May 15, 2025 16:01
@wraithgar wraithgar merged commit 8794fd9 into npm:latest May 15, 2025
29 checks passed
@alexsch01 alexsch01 deleted the version2 branch May 15, 2025 18:51
@alexsch01 alexsch01 mentioned this pull request May 15, 2025
wraithgar pushed a commit that referenced this pull request Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants