prquicktest 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ function isTestingHeader(line) {
63
63
  const level = match[1].length;
64
64
  const title = match[2].trim().toLowerCase();
65
65
 
66
- if (title === 'testing' || title === 'tests' || title === 'test') {
66
+ if (/^test(?:ing|s)?(?:\s+\w+)?$/.test(title)) {
67
67
  return { level, title: match[2].trim() };
68
68
  }
69
69
  return null;
@@ -91,7 +91,7 @@ function parseCondition(line) {
91
91
 
92
92
  function parseMarkdown(content) {
93
93
  const blocks = [];
94
- const lines = content.split('\n');
94
+ const lines = content.replace(/\r\n?/g, '\n').split('\n');
95
95
  let i = 0;
96
96
  let inTestingSection = false;
97
97
  let testingSectionLevel = null;
@@ -316,8 +316,8 @@ async function run(content, skipConfirm = false) {
316
316
  const blocks = parseMarkdown(content);
317
317
 
318
318
  if (blocks.length === 0) {
319
- console.log(`${colors.yellow}No "Testing" or "Tests" section found in the document.${colors.reset}`);
320
- console.log(`${colors.dim}Add a section like "## Testing" with code blocks to run.${colors.reset}`);
319
+ console.log(`${colors.yellow}No testing section found in the document.${colors.reset}`);
320
+ console.log(`${colors.dim}Add a section like "## Testing" or "## Test Plan" with code blocks to run.${colors.reset}`);
321
321
  return;
322
322
  }
323
323
 
@@ -447,7 +447,7 @@ ${colors.yellow}Examples:${colors.reset}
447
447
  prquicktest -y https://github.com/owner/repo/pull/123
448
448
 
449
449
  ${colors.yellow}How it works:${colors.reset}
450
- Only runs code blocks under a "Testing", "Tests", or "Test" header.
450
+ Runs code blocks under headers like "Testing", "Tests", "Test Plan", etc.
451
451
  The section ends when another header of equal or higher level appears.
452
452
  All blocks run in a single shell session — environment variables,
453
453
  working directory changes, and other state persist across blocks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prquicktest",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Run code blocks from GitHub PR descriptions",
5
5
  "type": "module",
6
6
  "scripts": {