From 2282ab57ecdd509c9aec877a650d5b7b3b9b4739 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 10 Sep 2023 17:23:54 -0700 Subject: [PATCH 1/3] fix syntax error at README --- CHANGELOG.md | 5 +++++ README.md | 14 +++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f99b52..63f7987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 6.1.2 - 2023-09-10 + +* [fix sytax error at README](https://github.com/iambumblehead/form-urlencoded/pull/50) + + ## 6.1.1 - 2023-09-10 * [add support for option 'ignoreEmptyArray',][611] credit @Sanva diff --git a/README.md b/README.md index 382dff8..a9f6d65 100644 --- a/README.md +++ b/README.md @@ -7,18 +7,18 @@ form-urlencoded Returns 'x-www-form-urlencoded' string data, an encoding often used when an [HTML form is submitted][1]. Form data is serialised in [this format][2] and sent to a server. ```javascript -import formurlencoded from 'form-urlencoded'; +import formurlencoded from 'form-urlencoded' // or: -// var formurlencoded = require('form-urlencoded'); +// var formurlencoded = require('form-urlencoded') const obj = { str : 'val', num : 0, arr : [3, {prop : false}, 1, null, 6], obj : {prop1 : null, prop2 : ['elem']} -}; +} -console.log(formurlencoded(obj)); +console.log(formurlencoded(obj)) // str=val&num=0&arr%5B0%5D=3&arr%5B1%5D%5Bprop%5D=false // &arr%5B2%5D=1&arr%5B3%5D=null&arr%5B4%5D=6&obj%5Bprop // 1%5D=null&obj%5Bprop2%5D%5B0%5D=elem @@ -27,17 +27,17 @@ console.log(formurlencoded(obj, { ignorenull : true, skipIndex : true, sorted : true -})); +})) // arr%5B%5D=3&arr%5B%5D%5Bprop%5D=false&arr%5B%5D=1&arr // %5B%5D=6&num=0&obj%5Bprop2%5D%5B%5D=elem&str=val console.log(formurlencoded(obj, { - ignoreEmptyArray: true + ignoreEmptyArray: true, ignorenull : true, useDot : true, skipIndex : true, skipBracket : true -})); +})) // str=val&num=0&arr=3&arr.prop=false&arr=1&arr=6&obj.pr // op2=elem ``` From 2120293fc5a17966e49ced8977bdcf080e0304eb Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 10 Sep 2023 17:25:38 -0700 Subject: [PATCH 2/3] remove npm-publish ci job --- .github/workflows/npm-publish.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index b7e0a6e..0121c30 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -18,19 +18,19 @@ jobs: - run: npm install - run: npm test - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm install - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + # publish-npm: + # needs: build + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v2 + # - uses: actions/setup-node@v2 + # with: + # node-version: 16 + # registry-url: https://registry.npmjs.org/ + # - run: npm install + # - run: npm publish + # env: + # NODE_AUTH_TOKEN: ${{secrets.npm_token}} publish-gpr: needs: build From ad98315bf539066a2276f36b1100611ac650d7ea Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 10 Sep 2023 17:25:59 -0700 Subject: [PATCH 3/3] increment version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index da456c0..7ef181b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "require": "./form-urlencoded.js", "import": "./form-urlencoded.mjs" }, - "version": "6.1.1", + "version": "6.1.2", "description": "Return an object as an 'x-www-form-urlencoded' string", "author": "Chris ", "license": "MIT",