norn-cli 1.1.2 → 1.1.3

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
+ ## [1.1.3] - 2026-02-01
6
+
7
+ ### Fixed
8
+ - **@data shorthand for single parameter**: `@data(1, 2, 3)` with a single parameter now correctly creates 3 test cases instead of 1 case with 3 values
9
+ - Example: `@data(1, 2, 3) test sequence Foo(id)` now runs 3 times with `id=1`, `id=2`, `id=3`
10
+ - Multi-parameter syntax unchanged: `@data(1, "a")` per line for each test case
11
+
5
12
  ## [1.1.2] - 2026-02-01
6
13
 
7
14
  ### Added
package/dist/cli.js CHANGED
@@ -20223,16 +20223,24 @@ function extractSequences(text) {
20223
20223
  let finalTheoryData = theoryData;
20224
20224
  if (theoryData && theoryData._rawCases) {
20225
20225
  const rawCases = theoryData._rawCases;
20226
- finalTheoryData = {
20227
- cases: rawCases.map((values) => {
20228
- const caseObj = {};
20229
- parameters.forEach((param, idx) => {
20230
- caseObj[param.name] = values[idx];
20231
- });
20232
- return caseObj;
20233
- }),
20234
- source: theoryData.source
20235
- };
20226
+ if (parameters.length === 1 && rawCases.length === 1 && rawCases[0].length > 1) {
20227
+ const paramName = parameters[0].name;
20228
+ finalTheoryData = {
20229
+ cases: rawCases[0].map((value) => ({ [paramName]: value })),
20230
+ source: theoryData.source
20231
+ };
20232
+ } else {
20233
+ finalTheoryData = {
20234
+ cases: rawCases.map((values) => {
20235
+ const caseObj = {};
20236
+ parameters.forEach((param, idx) => {
20237
+ caseObj[param.name] = values[idx];
20238
+ });
20239
+ return caseObj;
20240
+ }),
20241
+ source: theoryData.source
20242
+ };
20243
+ }
20236
20244
  }
20237
20245
  currentSequence = {
20238
20246
  name,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "norn-cli",
3
3
  "displayName": "Norn - REST Client",
4
4
  "description": "A powerful REST client for making HTTP requests with sequences, variables, scripts, and cookie support",
5
- "version": "1.1.2",
5
+ "version": "1.1.3",
6
6
  "publisher": "Norn-PeterKrustanov",
7
7
  "author": {
8
8
  "name": "Peter Krastanov"
@@ -168,7 +168,10 @@
168
168
  "check-types": "tsc --noEmit",
169
169
  "lint": "eslint src",
170
170
  "test": "vscode-test",
171
- "test:regression": "./tests/Regression/run-all.sh"
171
+ "test:regression": "./tests/Regression/run-all.sh",
172
+ "publish:npm": "node -e \"const p=require('./package.json');p.name='norn-cli';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2))\" && npm publish && node -e \"const p=require('./package.json');p.name='norn';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2))\"",
173
+ "publish:vsce": "node -e \"const p=require('./package.json');p.name='norn';require('fs').writeFileSync('package.json',JSON.stringify(p,null,2))\" && npx vsce publish",
174
+ "publish:all": "npm run publish:npm && npm run publish:vsce"
172
175
  },
173
176
  "devDependencies": {
174
177
  "@types/mocha": "^10.0.10",
@@ -191,4 +194,4 @@
191
194
  "bin": {
192
195
  "norn": "./dist/cli.js"
193
196
  }
194
- }
197
+ }