[PR #387] [MERGED] Replace shell-quote with shlex for curl import #309

Closed
opened 2026-03-22 21:15:59 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mountain-loop/yaak/pull/387
Author: @gschier
Created: 2/9/2026
Status: Merged
Merged: 2/9/2026
Merged by: @gschier

Base: mainHead: fix-curl-import


📝 Commits (3)

  • 9b25079 Replace shell-quote with shlex for proper $'...' ANSI-C quoting support
  • 3190de2 Fix backslash escape counting in splitCommands quote detection
  • 3259071 Skip splitting on escaped semicolons in splitCommands

📊 Changes

4 files changed (+242 additions, -99 deletions)

View changed files

📝 package-lock.json (+10 -13)
📝 plugins/importer-curl/package.json (+1 -4)
📝 plugins/importer-curl/src/index.ts (+87 -81)
📝 plugins/importer-curl/tests/index.test.ts (+144 -1)

📄 Description

This PR replaces shell-quote with shlex for curl command parsing. shlex natively supports $'...' (ANSI-C quoting) which browsers use when copying requests as cURL.

Fixes https://yaak.app/feedback/posts/curl-requests-not-getting-parsed-properly


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mountain-loop/yaak/pull/387 **Author:** [@gschier](https://github.com/gschier) **Created:** 2/9/2026 **Status:** ✅ Merged **Merged:** 2/9/2026 **Merged by:** [@gschier](https://github.com/gschier) **Base:** `main` ← **Head:** `fix-curl-import` --- ### 📝 Commits (3) - [`9b25079`](https://github.com/mountain-loop/yaak/commit/9b25079f10a16707ca5a43c49b292775efaf1f5d) Replace shell-quote with shlex for proper $'...' ANSI-C quoting support - [`3190de2`](https://github.com/mountain-loop/yaak/commit/3190de289dbc732a02decd2846a9cacc4377a9ab) Fix backslash escape counting in splitCommands quote detection - [`3259071`](https://github.com/mountain-loop/yaak/commit/3259071f7eeba4fe8b214c01c49c0aae0f04fb77) Skip splitting on escaped semicolons in splitCommands ### 📊 Changes **4 files changed** (+242 additions, -99 deletions) <details> <summary>View changed files</summary> 📝 `package-lock.json` (+10 -13) 📝 `plugins/importer-curl/package.json` (+1 -4) 📝 `plugins/importer-curl/src/index.ts` (+87 -81) 📝 `plugins/importer-curl/tests/index.test.ts` (+144 -1) </details> ### 📄 Description This PR replaces `shell-quote` with `shlex` for curl command parsing. `shlex` natively supports `$'...'` (ANSI-C quoting) which browsers use when copying requests as cURL. Fixes https://yaak.app/feedback/posts/curl-requests-not-getting-parsed-properly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-22 21:16:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/yaak#309