Skip to content

Commit

Permalink
feat: upgrade to Node.js 22
Browse files Browse the repository at this point in the history
  • Loading branch information
aradzie committed Oct 30, 2024
1 parent 581f9e8 commit 16cb590
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
node-version: "22.x"
cache: "npm"
- name: CI
run: |
Expand Down
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default [
version: "detect",
},
node: {
version: ">=20",
version: ">=22",
allowModules: [
...Object.keys(pkg.dependencies),
...Object.keys(pkg.devDependencies),
Expand Down
34 changes: 34 additions & 0 deletions patches/@devoxa+paddle-sdk+0.4.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/node_modules/@devoxa/paddle-sdk/dist/src/helpers/fetch.js b/node_modules/@devoxa/paddle-sdk/dist/src/helpers/fetch.js
index d7aa967..3ab6c7b 100644
--- a/node_modules/@devoxa/paddle-sdk/dist/src/helpers/fetch.js
+++ b/node_modules/@devoxa/paddle-sdk/dist/src/helpers/fetch.js
@@ -1,26 +1,3 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.fetch = void 0;
-const form_data_1 = __importDefault(require("form-data"));
-const node_fetch_1 = __importDefault(require("node-fetch"));
-async function fetch(url, options) {
- const response = await (0, node_fetch_1.default)(url, {
- method: options.method,
- body: objectToFormData(options.body),
- });
- return response.json();
+export async function fetch(url, options) {
+ throw new Error("Not supported");
}
-exports.fetch = fetch;
-function objectToFormData(object) {
- const formData = new form_data_1.default();
- Object.entries(object).forEach(([key, value]) => {
- if (typeof value === 'undefined')
- return;
- formData.append(key, value.toString());
- });
- return formData;
-}
-//# sourceMappingURL=fetch.js.map
\ No newline at end of file
2 changes: 1 addition & 1 deletion root/etc/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function install_packages() {
function install_nodejs() {
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg --yes
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt update -y
apt install -y --no-install-recommends --no-install-suggests \
nodejs
Expand Down

0 comments on commit 16cb590

Please sign in to comment.