fast-uri 2.0.0 → 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.
@@ -5,6 +5,9 @@ on:
5
5
  branches:
6
6
  - master
7
7
 
8
+ permissions:
9
+ contents: read
10
+
8
11
  jobs:
9
12
  pnpm:
10
13
  runs-on: ${{ matrix.os }}
@@ -12,26 +15,25 @@ jobs:
12
15
  strategy:
13
16
  matrix:
14
17
  # Maintenance and active LTS
15
- node-version: [10, 12, 14, 16]
16
- os: [ubuntu-latest]
18
+ node-version: [14, 16]
19
+ os: [ubuntu-18.04]
17
20
 
18
21
  steps:
19
22
  - uses: actions/checkout@v3
23
+ with:
24
+ persist-credentials: false
20
25
 
21
26
  - name: Use Node.js
22
- uses: actions/setup-node@v3.1.1
23
- id: setup_node
27
+ uses: actions/setup-node@v3
24
28
  with:
25
29
  node-version: ${{ matrix.node-version }}
26
30
 
27
31
  - name: Install with pnpm
28
- id: install_package_manager
29
32
  run: |
30
33
  curl -L https://unpkg.com/@pnpm/self-installer | node
31
34
  pnpm install
32
35
 
33
36
  - name: Run tests
34
- id: test
35
37
  run: |
36
38
  pnpm run test
37
39
 
@@ -41,25 +43,24 @@ jobs:
41
43
  strategy:
42
44
  matrix:
43
45
  # Maintenance and active LTS
44
- node-version: [10, 12, 14, 16]
45
- os: [ubuntu-latest]
46
+ node-version: [14, 16]
47
+ os: [ubuntu-18.04]
46
48
 
47
49
  steps:
48
50
  - uses: actions/checkout@v3
51
+ with:
52
+ persist-credentials: false
49
53
 
50
54
  - name: Use Node.js
51
- id: setup_node
52
- uses: actions/setup-node@v3.1.1
55
+ uses: actions/setup-node@v3
53
56
  with:
54
57
  node-version: ${{ matrix.node-version }}
55
58
 
56
59
  - name: Install with yarn
57
- id: install_package_manager
58
60
  run: |
59
61
  curl -o- -L https://yarnpkg.com/install.sh | bash
60
62
  yarn install --ignore-engines
61
63
 
62
64
  - name: Run tests
63
- id: test
64
65
  run: |
65
66
  yarn run test
package/index.js CHANGED
@@ -126,6 +126,10 @@ function serialize (cmpts, opts) {
126
126
  if (components.path !== undefined) {
127
127
  if (!options.skipEscape) {
128
128
  components.path = escape(components.path)
129
+
130
+ if (components.scheme !== undefined) {
131
+ components.path = components.path.split('%3A').join(':')
132
+ }
129
133
  } else {
130
134
  components.path = unescape(components.path)
131
135
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fast-uri",
3
3
  "description": "Dependency free RFC 3986 URI toolbox",
4
- "version": "2.0.0",
4
+ "version": "2.1.0",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
7
7
  "types": "index.d.ts",
@@ -111,6 +111,10 @@ test('compatibility serialize', (t) => {
111
111
  host: 'example.com',
112
112
  resourceName: '/foo?bar',
113
113
  secure: true
114
+ },
115
+ {
116
+ scheme: 'scheme',
117
+ path: 'with:colon'
114
118
  }
115
119
  ]
116
120
  toSerialize.forEach((x) => {