Skip to content
Draft
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
20 changes: 7 additions & 13 deletions .github/workflows/node-test.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,19 @@ jobs:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version:
- 0.10.x
- 0.12.x
- 4.x
- 6.x
- 8.x
# - 10.x
# - 12.x
# - 14.x
# - 16.x
# - 18.x
# - 20.x
- 10.x
- 12.x
- 14.x
- 16.x
- 18.x
- 20.x

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
# TODO: Enable cache when checking in package lockfile to git
# cache: 'npm'
cache: 'npm'
- run: npm install
- run: npm run test
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,7 @@ Generator.prototype.addSourceContent = function (sourceFile, sourcesContent) {
*/
Generator.prototype.base64Encode = function () {
var map = this.toString();
if (Buffer.from) {
return Buffer.from(map).toString('base64');
}
return new Buffer(map).toString('base64');
return Buffer.from(map).toString('base64');
};

/**
Expand Down
Loading