diff --git a/.github/workflows/JScrewIt.yml b/.github/workflows/JScrewIt.yml index 574643b3..51545caf 100644 --- a/.github/workflows/JScrewIt.yml +++ b/.github/workflows/JScrewIt.yml @@ -39,7 +39,20 @@ jobs: strategy: matrix: - node-version: ['0.10', '0.12', '4', '6', '8', '10', '12', '14', '16', '18', '20', '22'] + node-version: + - '0.10' + - '0.12' + - '4' + - '6.0' + - '6' + - '8' + - '10' + - '12' + - '14' + - '16' + - '18' + - '20' + - '22' steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/~feature-hub.yml b/.github/workflows/~feature-hub.yml index ecdcfbce..607eb3e5 100644 --- a/.github/workflows/~feature-hub.yml +++ b/.github/workflows/~feature-hub.yml @@ -61,7 +61,7 @@ jobs: - run: | npm install --prefix ../.. npm run prepare-legacy-test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: node-legacy path: packages/~feature-hub/test/node-legacy @@ -76,14 +76,14 @@ jobs: strategy: matrix: - node-version: ['0.10', '0.12', '4', '6', '8', '10', '12'] + node-version: ['0.10', '0.12', '4', '6.0', '6', '8', '10', '12'] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-legacy path: packages/~feature-hub/test/node-legacy diff --git a/.github/workflows/~result-format.yml b/.github/workflows/~result-format.yml index 17403c0c..64cd6027 100644 --- a/.github/workflows/~result-format.yml +++ b/.github/workflows/~result-format.yml @@ -61,7 +61,7 @@ jobs: - run: | npm install --prefix ../.. npm run prepare-legacy-test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: node-legacy path: packages/~result-format/test/node-legacy @@ -76,14 +76,14 @@ jobs: strategy: matrix: - node-version: ['0.10', '0.12', '4', '6', '8', '10', '12'] + node-version: ['0.10', '0.12', '4', '6.0', '6', '8', '10', '12'] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-legacy path: packages/~result-format/test/node-legacy diff --git a/.github/workflows/~solution.yml b/.github/workflows/~solution.yml index 8fbe2607..a6b6e7f6 100644 --- a/.github/workflows/~solution.yml +++ b/.github/workflows/~solution.yml @@ -61,7 +61,7 @@ jobs: - run: | npm install --prefix ../.. npm run prepare-legacy-test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: node-legacy path: packages/~solution/test/node-legacy @@ -76,14 +76,14 @@ jobs: strategy: matrix: - node-version: ['0.10', '0.12', '4', '6', '8', '10', '12'] + node-version: ['0.10', '0.12', '4', '6.0', '6', '8', '10', '12'] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-legacy path: packages/~solution/test/node-legacy diff --git a/api-doc/README.md b/api-doc/README.md index 20983975..1af11e36 100644 --- a/api-doc/README.md +++ b/api-doc/README.md @@ -7,14 +7,14 @@ ## Interfaces - [CustomFeature](interfaces/CustomFeature.md) +- [default](interfaces/default.md) - [ElementaryFeature](interfaces/ElementaryFeature.md) +- [encode](interfaces/encode.md) - [EncodeOptions](interfaces/EncodeOptions.md) - [Feature](interfaces/Feature.md) - [FeatureAll](interfaces/FeatureAll.md) - [FeatureConstructor](interfaces/FeatureConstructor.md) - [PredefinedFeature](interfaces/PredefinedFeature.md) -- [default](interfaces/default.md) -- [encode](interfaces/encode.md) ## Type Aliases @@ -26,8 +26,8 @@ ## Variables -- [Feature](variables/Feature.md) - [default](variables/default.md) +- [Feature](variables/Feature.md) ## Functions diff --git a/api-doc/interfaces/FeatureAll.md b/api-doc/interfaces/FeatureAll.md index 32f9326f..92ba31b6 100644 --- a/api-doc/interfaces/FeatureAll.md +++ b/api-doc/interfaces/FeatureAll.md @@ -662,15 +662,55 @@ Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js. *** -### NODECONSTRUCTOR +### NO\_FF\_SRC -> **NODECONSTRUCTOR**: [`ElementaryFeature`](ElementaryFeature.md) +> **NO\_FF\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) -Existence of the global object Node having the string representation "\[object NodeConstructor\]". +A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari. #### Remarks -Available in Safari before 10.0. This feature is not available inside web workers. +Available in Chrome, Edge, Internet Explorer, Opera, Android Browser, and Node.js. + +*** + +### NO\_IE\_SRC + +> **NO\_IE\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) + +A string representation of native functions typical for most engines with the notable exception of Internet Explorer. + +A remarkable trait of this feature is the lack of line feed characters at the beginning and at the end of the string. + +#### Remarks + +Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js. + +*** + +### NO\_OLD\_SAFARI\_ARRAY\_ITERATOR + +> **NO\_OLD\_SAFARI\_ARRAY\_ITERATOR**: [`ElementaryFeature`](ElementaryFeature.md) + +The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]". + +#### Remarks + +Available in Chrome, Edge, Firefox, Safari 9+, Opera, and Node.js 0.12+. + +*** + +### NO\_V8\_SRC + +> **NO\_V8\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) + +A string representation of native functions typical for Firefox, Internet Explorer and Safari. + +A most remarkable trait of this feature is the presence of a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence. + +#### Remarks + +Available in Firefox, Internet Explorer, and Safari. *** @@ -778,55 +818,15 @@ Features available in Node.js 7.6 to 9. *** -### NO\_FF\_SRC - -> **NO\_FF\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) - -A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari. - -#### Remarks - -Available in Chrome, Edge, Internet Explorer, Opera, Android Browser, and Node.js. - -*** - -### NO\_IE\_SRC - -> **NO\_IE\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) - -A string representation of native functions typical for most engines with the notable exception of Internet Explorer. - -A remarkable trait of this feature is the lack of line feed characters at the beginning and at the end of the string. - -#### Remarks - -Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js. - -*** - -### NO\_OLD\_SAFARI\_ARRAY\_ITERATOR - -> **NO\_OLD\_SAFARI\_ARRAY\_ITERATOR**: [`ElementaryFeature`](ElementaryFeature.md) - -The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]". - -#### Remarks - -Available in Chrome, Edge, Firefox, Safari 9+, Opera, and Node.js 0.12+. - -*** - -### NO\_V8\_SRC - -> **NO\_V8\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) +### NODECONSTRUCTOR -A string representation of native functions typical for Firefox, Internet Explorer and Safari. +> **NODECONSTRUCTOR**: [`ElementaryFeature`](ElementaryFeature.md) -A most remarkable trait of this feature is the presence of a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence. +Existence of the global object Node having the string representation "\[object NodeConstructor\]". #### Remarks -Available in Firefox, Internet Explorer, and Safari. +Available in Safari before 10.0. This feature is not available inside web workers. *** diff --git a/api-doc/interfaces/FeatureConstructor.md b/api-doc/interfaces/FeatureConstructor.md index f775de56..903ba0c2 100644 --- a/api-doc/interfaces/FeatureConstructor.md +++ b/api-doc/interfaces/FeatureConstructor.md @@ -1004,19 +1004,71 @@ Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js. *** -### NODECONSTRUCTOR +### NO\_FF\_SRC -> **NODECONSTRUCTOR**: [`ElementaryFeature`](ElementaryFeature.md) +> **NO\_FF\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) -Existence of the global object Node having the string representation "\[object NodeConstructor\]". +A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari. #### Remarks -Available in Safari before 10.0. This feature is not available inside web workers. +Available in Chrome, Edge, Internet Explorer, Opera, Android Browser, and Node.js. #### Inherited from -[`FeatureAll`](FeatureAll.md).[`NODECONSTRUCTOR`](FeatureAll.md#nodeconstructor) +[`FeatureAll`](FeatureAll.md).[`NO_FF_SRC`](FeatureAll.md#no_ff_src) + +*** + +### NO\_IE\_SRC + +> **NO\_IE\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) + +A string representation of native functions typical for most engines with the notable exception of Internet Explorer. + +A remarkable trait of this feature is the lack of line feed characters at the beginning and at the end of the string. + +#### Remarks + +Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js. + +#### Inherited from + +[`FeatureAll`](FeatureAll.md).[`NO_IE_SRC`](FeatureAll.md#no_ie_src) + +*** + +### NO\_OLD\_SAFARI\_ARRAY\_ITERATOR + +> **NO\_OLD\_SAFARI\_ARRAY\_ITERATOR**: [`ElementaryFeature`](ElementaryFeature.md) + +The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]". + +#### Remarks + +Available in Chrome, Edge, Firefox, Safari 9+, Opera, and Node.js 0.12+. + +#### Inherited from + +[`FeatureAll`](FeatureAll.md).[`NO_OLD_SAFARI_ARRAY_ITERATOR`](FeatureAll.md#no_old_safari_array_iterator) + +*** + +### NO\_V8\_SRC + +> **NO\_V8\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) + +A string representation of native functions typical for Firefox, Internet Explorer and Safari. + +A most remarkable trait of this feature is the presence of a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence. + +#### Remarks + +Available in Firefox, Internet Explorer, and Safari. + +#### Inherited from + +[`FeatureAll`](FeatureAll.md).[`NO_V8_SRC`](FeatureAll.md#no_v8_src) *** @@ -1176,71 +1228,19 @@ Features available in Node.js 7.6 to 9. *** -### NO\_FF\_SRC - -> **NO\_FF\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) - -A string representation of native functions typical for V8 or for Internet Explorer but not for Firefox and Safari. - -#### Remarks - -Available in Chrome, Edge, Internet Explorer, Opera, Android Browser, and Node.js. - -#### Inherited from - -[`FeatureAll`](FeatureAll.md).[`NO_FF_SRC`](FeatureAll.md#no_ff_src) - -*** - -### NO\_IE\_SRC - -> **NO\_IE\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) - -A string representation of native functions typical for most engines with the notable exception of Internet Explorer. - -A remarkable trait of this feature is the lack of line feed characters at the beginning and at the end of the string. - -#### Remarks - -Available in Chrome, Edge, Firefox, Safari, Opera, Android Browser, and Node.js. - -#### Inherited from - -[`FeatureAll`](FeatureAll.md).[`NO_IE_SRC`](FeatureAll.md#no_ie_src) - -*** - -### NO\_OLD\_SAFARI\_ARRAY\_ITERATOR - -> **NO\_OLD\_SAFARI\_ARRAY\_ITERATOR**: [`ElementaryFeature`](ElementaryFeature.md) - -The property that the string representation of Array.prototype.entries\(\) evaluates to "\[object Array Iterator\]". - -#### Remarks - -Available in Chrome, Edge, Firefox, Safari 9+, Opera, and Node.js 0.12+. - -#### Inherited from - -[`FeatureAll`](FeatureAll.md).[`NO_OLD_SAFARI_ARRAY_ITERATOR`](FeatureAll.md#no_old_safari_array_iterator) - -*** - -### NO\_V8\_SRC - -> **NO\_V8\_SRC**: [`ElementaryFeature`](ElementaryFeature.md) +### NODECONSTRUCTOR -A string representation of native functions typical for Firefox, Internet Explorer and Safari. +> **NODECONSTRUCTOR**: [`ElementaryFeature`](ElementaryFeature.md) -A most remarkable trait of this feature is the presence of a line feed followed by four whitespaces \("\\n "\) before the "\[native code\]" sequence. +Existence of the global object Node having the string representation "\[object NodeConstructor\]". #### Remarks -Available in Firefox, Internet Explorer, and Safari. +Available in Safari before 10.0. This feature is not available inside web workers. #### Inherited from -[`FeatureAll`](FeatureAll.md).[`NO_V8_SRC`](FeatureAll.md#no_v8_src) +[`FeatureAll`](FeatureAll.md).[`NODECONSTRUCTOR`](FeatureAll.md#nodeconstructor) *** diff --git a/api-doc/interfaces/default.md b/api-doc/interfaces/default.md index 9256e183..6b3653a9 100644 --- a/api-doc/interfaces/default.md +++ b/api-doc/interfaces/default.md @@ -6,12 +6,12 @@ ## Properties -### Feature +### encode -> **Feature**: [`FeatureConstructor`](FeatureConstructor.md) +> **encode**: [`encode`](encode.md) *** -### encode +### Feature -> **encode**: [`encode`](encode.md) +> **Feature**: [`FeatureConstructor`](FeatureConstructor.md) diff --git a/src/lib/encoder/encoder-base.js b/src/lib/encoder/encoder-base.js index 2c06ee39..5d8f896b 100644 --- a/src/lib/encoder/encoder-base.js +++ b/src/lib/encoder/encoder-base.js @@ -316,7 +316,9 @@ var matchSimpleAt = function (str, index) { regExp.lastIndex = index; - var match = str.match(regExp); + // String.prototype.match doesn't work well with sticky regular expressions in Node.js < + // 6.5. + var match = regExp.exec(str); if (match) return match[0]; }; diff --git a/src/package.yml.hbs b/src/package.yml.hbs index bc2aea89..a913e05b 100644 --- a/src/package.yml.hbs +++ b/src/package.yml.hbs @@ -61,7 +61,7 @@ jobs: - run: | npm install --prefix ../.. npm run prepare-legacy-test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: node-legacy path: packages/{{package}}/test/node-legacy @@ -76,14 +76,14 @@ jobs: strategy: matrix: - node-version: ['0.10', '0.12', '4', '6', '8', '10', '12'] + node-version: ['0.10', '0.12', '4', '6.0', '6', '8', '10', '12'] steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: $\{{ matrix.node-version }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: node-legacy path: packages/{{package}}/test/node-legacy