Skip to content

Commit b3d052b

Browse files
authored
Dropped support for Node < v18 (#1382)
1 parent 7923096 commit b3d052b

19 files changed

+7407
-4604
lines changed

.eslintrc

Lines changed: 149 additions & 191 deletions
Large diffs are not rendered by default.

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
- name: Checkout repository
2020
uses: actions/checkout@v3
2121

22-
- name: Use Node.js 16.x
22+
- name: Use Node.js 18.x
2323
uses: actions/setup-node@v3
2424
with:
25-
node-version: 16.x
25+
node-version: 18.x
2626
cache: 'npm'
2727

2828
- name: Install
@@ -39,10 +39,10 @@ jobs:
3939
- name: Checkout repository
4040
uses: actions/checkout@v3
4141

42-
- name: Use Node.js 16.x
42+
- name: Use Node.js 18.x
4343
uses: actions/setup-node@v3
4444
with:
45-
node-version: 16.x
45+
node-version: 18.x
4646
cache: 'npm'
4747

4848
- name: Install
@@ -57,11 +57,11 @@ jobs:
5757
strategy:
5858
fail-fast: false
5959
matrix:
60-
node-version: [10, 12]
60+
node-version: [18, 20]
6161
os: [ubuntu-latest, windows-latest]
6262
include:
6363
- coverage: true
64-
node-version: 16
64+
node-version: latest
6565
os: ubuntu-latest
6666

6767
steps:

CHANGELOG.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
unreleased:
2+
breaking changes:
3+
- GH-1382 Dropped support for Node.js < v18
24
fixed bugs:
35
- GH-1394 Fixed QueryParam normalization regex
46
- >-
57
Fixed a bug where `PropertyBase.parent` used to return grandparent for
68
non-list parent
9+
chores:
10+
- GH-1382 Updated dependencies
11+
- GH-1382 Updated ESLint rules
12+
- GH-1382 Run code coverage on latest Node version in CI
713

814
4.5.0:
915
date: 2024-08-01

lib/collection/item-group.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ _.assign(ItemGroup.prototype, /** @lends ItemGroup.prototype */ {
209209
this.items.each(function (item) {
210210
if (ItemGroup.isItemGroup(item)) {
211211
item.forEachItemGroup(callback);
212-
callback(item, this); // eslint-disable-line callback-return
212+
callback(item, this); // eslint-disable-line n/callback-return
213213
}
214214
}, this);
215215
},

lib/collection/property-base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ _.assign(PropertyBase.prototype, /** @lends PropertyBase.prototype */ {
124124

125125
// Handle plurality of PropertyLists in the SDK vs the exported JSON.
126126
// Basically, removes the trailing "s" from key if the value is a property list.
127-
// eslint-disable-next-line max-len
127+
// eslint-disable-next-line @stylistic/js/max-len
128128
if (value && value._postman_propertyIsList && !value._postman_proprtyIsSerialisedAsPlural && _.endsWith(key, 's')) {
129129
key = key.slice(0, -1);
130130
}

lib/collection/property-list.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ _.assign(PropertyList.prototype, /** @lends PropertyList.prototype */ {
132132
this._postman_listIndexCaseInsensitive && (index = index.toLowerCase());
133133

134134
// if multiple values are allowed, the reference may contain an array of items, mapped to an index.
135-
if (this._postman_listAllowsMultipleValues && Object.hasOwnProperty.call(this.reference, index)) {
135+
if (this._postman_listAllowsMultipleValues && Object.hasOwn(this.reference, index)) {
136136
// if the value is not an array, convert it to an array.
137137
!_.isArray(this.reference[index]) && (this.reference[index] = [this.reference[index]]);
138138

lib/collection/property.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function _findSubstitutions (value, seen = new Set(), result = new Set()) {
3636
seen.add(value);
3737

3838
for (const key in value) {
39-
if (Object.hasOwnProperty.call(value, key)) {
39+
if (Object.hasOwn(value, key)) {
4040
_findSubstitutions(value[key], seen, result);
4141
}
4242
}
@@ -156,7 +156,7 @@ _.inherit((
156156
* item.description && console.log(item.description.toString());
157157
* });
158158
*/
159-
// eslint-disable-next-line max-len
159+
// eslint-disable-next-line @stylistic/js/max-len
160160
_.has(src, DESCRIPTION) && (this.description = _.createDefined(src, DESCRIPTION, Description, this.description));
161161
}), PropertyBase);
162162

lib/collection/variable-scope.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ _.assign(VariableScope.prototype, /** @lends VariableScope.prototype */ {
146146
* @deprecated discontinued in v4.0
147147
*/
148148
variables: function () {
149-
// eslint-disable-next-line max-len
149+
// eslint-disable-next-line @stylistic/js/max-len
150150
throw new Error('`VariableScope#variables` has been discontinued, use `VariableScope#syncVariablesTo` instead.');
151151
},
152152

lib/content-info/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ var util = require('../util'),
121121
* egHeader: inline; filename="test Response.json"
122122
* Reference: https://github.com/jshttp/content-disposition
123123
*/
124-
// eslint-disable-next-line max-len
124+
// eslint-disable-next-line @stylistic/js/max-len
125125
fileNameRegex: /;[ \t]*(?:filename)[ \t]*=[ \t]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[ \t]*/,
126126

127127
/**
@@ -155,7 +155,7 @@ var util = require('../util'),
155155
* egHeader: attachment;filename*=utf-8''%E4%BD%A0%E5%A5%BD.txt
156156
* Reference: https://github.com/jshttp/content-disposition
157157
*/
158-
// eslint-disable-next-line max-len, security/detect-unsafe-regex
158+
// eslint-disable-next-line @stylistic/js/max-len, security/detect-unsafe-regex
159159
encodedFileNameRegex: /;[ \t]*(?:filename\*)[ \t]*=[ \t]*([A-Za-z0-9!#$%&+\-^_`{}~]+)'.*'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)[ \t]*/,
160160

161161
/**

lib/superstring/dynamic-variables.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ var faker = require('@faker-js/faker/locale/en'),
374374
generator: () => {
375375
// ref: https://github.com/faker-js/faker/blob/v8.4.1/src/modules/image/index.ts#L61
376376
return faker.random.arrayElement([
377-
// eslint-disable-next-line max-len
377+
// eslint-disable-next-line @stylistic/js/max-len
378378
`https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/${faker.datatype.number(1249)}.jpg`,
379379
`https://avatars.githubusercontent.com/u/${faker.datatype.number(100000000)}`
380380
]);

0 commit comments

Comments
 (0)