From 2e3f489dd33e2978dabd468256fcda531c845cf9 Mon Sep 17 00:00:00 2001 From: almenon Date: Thu, 14 Nov 2024 18:08:23 -0800 Subject: [PATCH] upgrade node to fix "Error: Unable to find Node version '12.x' for platform darwin and architecture arm64." --- .github/workflows/main.yml | 2 +- package-lock.json | 52 +++++++++++++++++++++++++------------- package.json | 4 +-- src/throttle.ts | 2 +- 4 files changed, 39 insertions(+), 21 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6acfb90..6b2bafd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: - name: Install Node.js uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: 20.x - run: npm ci - run: npm run vscode:prepublish - run: npm run unitTests diff --git a/package-lock.json b/package-lock.json index 04ba68f..2bb5394 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "devDependencies": { "@types/glob": "^7.1.1", "@types/mocha": "^9.1.1", - "@types/node": "^12.11.7", + "@types/node": "^20.17.6", "@types/vscode": "^1.36.0", "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "^2.4.1", @@ -26,7 +26,7 @@ "mocha": "^10.8.2", "source-map-support": "^0.5.13", "ts-node": "^8.6.2", - "typescript": "^3.9.6", + "typescript": "^5.6.3", "vscode-uri": "^2.1.2" }, "engines": { @@ -215,10 +215,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "12.12.42", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.42.tgz", - "integrity": "sha512-R/9QdYFLL9dE9l5cWWzWIZByVGFd7lk7JVOJ7KD+E1SJ4gni7XJRLz9QTjyYQiHIqEAgku9VgxdLjMlhhUaAFg==", - "dev": true + "version": "20.17.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", + "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } }, "node_modules/@types/vscode": { "version": "1.39.0", @@ -2223,18 +2226,24 @@ } }, "node_modules/typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, "node_modules/util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", @@ -2559,10 +2568,13 @@ "dev": true }, "@types/node": { - "version": "12.12.42", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.42.tgz", - "integrity": "sha512-R/9QdYFLL9dE9l5cWWzWIZByVGFd7lk7JVOJ7KD+E1SJ4gni7XJRLz9QTjyYQiHIqEAgku9VgxdLjMlhhUaAFg==", - "dev": true + "version": "20.17.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.6.tgz", + "integrity": "sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==", + "dev": true, + "requires": { + "undici-types": "~6.19.2" + } }, "@types/vscode": { "version": "1.39.0", @@ -4042,9 +4054,15 @@ } }, "typescript": { - "version": "3.9.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.6.tgz", - "integrity": "sha512-Pspx3oKAPJtjNwE92YS05HQoY7z2SFyOpHo9MqJor3BXAGNaPUs83CuVp9VISFkSjyRfiTpmKuAYGJB7S7hOxw==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", + "dev": true + }, + "undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "util": { diff --git a/package.json b/package.json index 97f5e82..eacc6c6 100644 --- a/package.json +++ b/package.json @@ -281,7 +281,7 @@ "devDependencies": { "@types/glob": "^7.1.1", "@types/mocha": "^9.1.1", - "@types/node": "^12.11.7", + "@types/node": "^20.17.6", "@types/vscode": "^1.36.0", "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "^2.4.1", @@ -290,7 +290,7 @@ "mocha": "^10.8.2", "source-map-support": "^0.5.13", "ts-node": "^8.6.2", - "typescript": "^3.9.6", + "typescript": "^5.6.3", "vscode-uri": "^2.1.2" }, "dependencies": { diff --git a/src/throttle.ts b/src/throttle.ts index 6ac7b9f..65e9be0 100644 --- a/src/throttle.ts +++ b/src/throttle.ts @@ -7,7 +7,7 @@ export class Limit{ public callQueue = [] public lastCall - public interval: NodeJS.Timer + public interval: NodeJS.Timeout /** * Returns a version of your function that can be called at most every W milliseconds, where W is wait.