Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/cliPublic

chore: upgrade tap@21#8085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
reggi wants to merge22 commits intolatest
base:latest
Choose a base branch
Loading
fromreggi/tap-ugprade-21
Draft

chore: upgrade tap@21#8085

reggi wants to merge22 commits intolatestfromreggi/tap-ugprade-21

Conversation

reggi
Copy link
Contributor

@reggireggi commentedFeb 5, 2025
edited
Loading

apart of:npm/statusboard#913

Outline of Changes (all of these don't need to be in this PR and can be broken down individually)

  1. updates tap dep to 21
  2. Tap changedt.mock tot.mockRequire
  3. updates template-oss to changetap.exclude in package.json
  4. At the time of this PR vendorednode_modules is dirty and needs updates fromnpa (should be in another pr)
  5. Discovery that tap@21 needs./node_modules/minipass/dist/commonjs/index.js.map checked in to run correctly
  6. Including all.map files withinnode_modules, currently we don't check in.md,.ts, and.map (should be in another pr)
  7. Update all snapshots to the new format
  8. Custom file fixes
    • test/lib/cli/update-notifier.js
    • test/lib/commands/diff.js
    • test/lib/commands/doctor.js
    • test/lib/commands/exec.js
    • test/lib/commands/explore.js
    • test/lib/commands/link.js
    • test/lib/commands/ls.js
    • test/lib/commands/run-script.js
    • test/lib/utils/log-file.js
  9. Move on to workspaces
  10. Ensure we still maintain 100% coverage

@reggireggi changed the titleReggi/tap ugprade 21chore: upgrade tap@21Feb 7, 2025
@@ -70,7 +70,7 @@

t.ok(PJ_CALLED.endsWith('/pkg'))
t.strictSame(RUN_SCRIPT_EXEC, 'shell-command')
t.match(output, /Exploring \{CWD\}\/[\w-_/]+\nType 'exit' or \^D when finished/)
t.match(output, /Exploring \{CWD\}\/(.+)+\nType 'exit' or \^D when finished/)

Check failure

Code scanning / CodeQL

Inefficient regular expression High test

This part of the regular expression may cause exponential backtracking on strings starting with 'Exploring {CWD}/' and containing many repetitions of 'a'.

Copilot Autofix

AI 5 months ago

To fix the problem, we need to modify the regular expression to remove the ambiguity that causes exponential backtracking. Specifically, we can replace the.+ pattern with a more specific pattern that avoids ambiguity. In this case, we can use[^/]+ to match one or more characters that are not a forward slash, which aligns with the intended use of the regular expression.

  • Modify the regular expression on line 73 to use[^/]+ instead of.+.
  • Ensure that the new pattern still matches the intended strings without causing performance issues.
Suggested changeset1
test/lib/commands/explore.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git applydiff --git a/test/lib/commands/explore.js b/test/lib/commands/explore.js--- a/test/lib/commands/explore.js+++ b/test/lib/commands/explore.js@@ -72,3 +72,3 @@   t.strictSame(RUN_SCRIPT_EXEC, 'shell-command')-  t.match(output, /Exploring \{CWD\}\/(.+)+\nType 'exit' or \^D when finished/)+  t.match(output, /Exploring \{CWD\}\/([^/]+)+\nType 'exit' or \^D when finished/) })EOF
@@ -72,3 +72,3 @@
t.strictSame(RUN_SCRIPT_EXEC,'shell-command')
t.match(output,/Exploring\{CWD\}\/(.+)+\nType'exit'or\^Dwhenfinished/)
t.match(output,/Exploring\{CWD\}\/([^/]+)+\nType'exit'or\^Dwhenfinished/)
})
@@ -83,7 +83,7 @@

t.ok(PJ_CALLED.endsWith('/pkg'))
t.strictSame(RUN_SCRIPT_EXEC, 'shell-command')
t.match(output, /Exploring \{CWD\}\/[\w-_/]+\nType 'exit' or \^D when finished/)
t.match(output, /Exploring \{CWD\}\/(.+)+\nType 'exit' or \^D when finished/)

Check failure

Code scanning / CodeQL

Inefficient regular expression High test

This part of the regular expression may cause exponential backtracking on strings starting with 'Exploring {CWD}/' and containing many repetitions of 'a'.

Copilot Autofix

AI 5 months ago

To fix the problem, we need to modify the regular expression to remove the nested quantifiers that cause exponential backtracking. The best way to do this is to replace(.+)+ with a more specific pattern that avoids ambiguity. In this case, we can use([^/]+) to match one or more characters that are not a forward slash, which achieves the same goal without the risk of catastrophic backtracking.

Suggested changeset1
test/lib/commands/explore.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git applydiff --git a/test/lib/commands/explore.js b/test/lib/commands/explore.js--- a/test/lib/commands/explore.js+++ b/test/lib/commands/explore.js@@ -72,3 +72,3 @@   t.strictSame(RUN_SCRIPT_EXEC, 'shell-command')-  t.match(output, /Exploring \{CWD\}\/(.+)+\nType 'exit' or \^D when finished/)+  t.match(output, /Exploring \{CWD\}\/([^/]+)\nType 'exit' or \^D when finished/) })@@ -85,3 +85,3 @@     t.strictSame(RUN_SCRIPT_EXEC, 'shell-command')-    t.match(output, /Exploring \{CWD\}\/(.+)+\nType 'exit' or \^D when finished/)+    t.match(output, /Exploring \{CWD\}\/([^/]+)\nType 'exit' or \^D when finished/) EOF
@@ -72,3 +72,3 @@
t.strictSame(RUN_SCRIPT_EXEC,'shell-command')
t.match(output,/Exploring\{CWD\}\/(.+)+\nType'exit'or\^Dwhenfinished/)
t.match(output,/Exploring\{CWD\}\/([^/]+)\nType'exit'or\^Dwhenfinished/)
})
@@ -85,3 +85,3 @@
t.strictSame(RUN_SCRIPT_EXEC,'shell-command')
t.match(output,/Exploring\{CWD\}\/(.+)+\nType'exit'or\^Dwhenfinished/)
t.match(output,/Exploring\{CWD\}\/([^/]+)\nType'exit'or\^Dwhenfinished/)

@reggi
Copy link
ContributorAuthor

the core cli tests are passing but these aren't represented now in their own

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant
@reggi

[8]ページ先頭

©2009-2025 Movatter.jp