Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropped support for Node < v18 #1382

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
340 changes: 149 additions & 191 deletions .eslintrc

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: 'npm'

- name: Install
Expand All @@ -39,10 +39,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Use Node.js 16.x
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: 'npm'

- name: Install
Expand All @@ -57,11 +57,11 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [10, 12]
node-version: [18, 20]
os: [ubuntu-latest, windows-latest]
include:
- coverage: true
node-version: 16
node-version: latest
os: ubuntu-latest

steps:
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
unreleased:
breaking changes:
- GH-1381 Dropped support for Node.js < v18
chores:
- GH-1381 Updated dependencies
- GH-1381 Updated ESLint rules
- GH-1381 Run code coverage on latest Node version in CI

4.5.0:
date: 2024-08-01
new features:
Expand Down
2 changes: 1 addition & 1 deletion lib/collection/item-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ _.assign(ItemGroup.prototype, /** @lends ItemGroup.prototype */ {
this.items.each(function (item) {
if (ItemGroup.isItemGroup(item)) {
item.forEachItemGroup(callback);
callback(item, this); // eslint-disable-line callback-return
callback(item, this); // eslint-disable-line n/callback-return
}
}, this);
},
Expand Down
2 changes: 1 addition & 1 deletion lib/collection/property-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ _.assign(PropertyBase.prototype, /** @lends PropertyBase.prototype */ {

// Handle plurality of PropertyLists in the SDK vs the exported JSON.
// Basically, removes the trailing "s" from key if the value is a property list.
// eslint-disable-next-line max-len
// eslint-disable-next-line @stylistic/js/max-len
if (value && value._postman_propertyIsList && !value._postman_proprtyIsSerialisedAsPlural && _.endsWith(key, 's')) {
key = key.slice(0, -1);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/collection/property-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ _.assign(PropertyList.prototype, /** @lends PropertyList.prototype */ {
this._postman_listIndexCaseInsensitive && (index = index.toLowerCase());

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

Expand Down
4 changes: 2 additions & 2 deletions lib/collection/property.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function _findSubstitutions (value, seen = new Set(), result = new Set()) {
seen.add(value);

for (const key in value) {
if (Object.hasOwnProperty.call(value, key)) {
if (Object.hasOwn(value, key)) {
_findSubstitutions(value[key], seen, result);
}
}
Expand Down Expand Up @@ -156,7 +156,7 @@ _.inherit((
* item.description && console.log(item.description.toString());
* });
*/
// eslint-disable-next-line max-len
// eslint-disable-next-line @stylistic/js/max-len
_.has(src, DESCRIPTION) && (this.description = _.createDefined(src, DESCRIPTION, Description, this.description));
}), PropertyBase);

Expand Down
2 changes: 1 addition & 1 deletion lib/collection/variable-scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ _.assign(VariableScope.prototype, /** @lends VariableScope.prototype */ {
* @deprecated discontinued in v4.0
*/
variables: function () {
// eslint-disable-next-line max-len
// eslint-disable-next-line @stylistic/js/max-len
throw new Error('`VariableScope#variables` has been discontinued, use `VariableScope#syncVariablesTo` instead.');
},

Expand Down
4 changes: 2 additions & 2 deletions lib/content-info/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ var util = require('../util'),
* egHeader: inline; filename="test Response.json"
* Reference: https://github.com/jshttp/content-disposition
*/
// eslint-disable-next-line max-len
// eslint-disable-next-line @stylistic/js/max-len
fileNameRegex: /;[ \t]*(?:filename)[ \t]*=[ \t]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[ \t]*/,

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

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/superstring/dynamic-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ var faker = require('@faker-js/faker/locale/en'),
generator: () => {
// ref: https://github.com/faker-js/faker/blob/v8.4.1/src/modules/image/index.ts#L61
return faker.random.arrayElement([
// eslint-disable-next-line max-len
// eslint-disable-next-line @stylistic/js/max-len
`https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/${faker.datatype.number(1249)}.jpg`,
`https://avatars.githubusercontent.com/u/${faker.datatype.number(100000000)}`
]);
Expand Down
Loading
Loading