From 5a20cdc8ca9a5991ddc4011c94e3005bdd96280d Mon Sep 17 00:00:00 2001 From: Marc Harter Date: Mon, 22 Jan 2024 10:58:53 -0700 Subject: [PATCH] Fix broken windows (#115) Includes: - Remove Node 14 support - Update dependencies - Update build scripts --- .github/workflows/build.yml | 8 ++++---- index.ts | 4 ++-- package.json | 36 ++++++++++++++++++------------------ public/index.html | 2 +- tsconfig.json | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed3cfa2..9538674 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,15 +8,15 @@ jobs: build: runs-on: ubuntu-latest container: - image: osgeo/gdal:ubuntu-small-latest + image: ghcr.io/osgeo/gdal:ubuntu-small-latest options: --user 1001 strategy: matrix: - node: ["14", "16", "18"] + node: ["16", "18", "20"] name: Node v${{ matrix.node }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} - run: npm install diff --git a/index.ts b/index.ts index 8cae16d..c6e5ae5 100644 --- a/index.ts +++ b/index.ts @@ -45,7 +45,7 @@ class Ogre { storage: diskStorage({ filename(_req, file, cb) { randomBytes(16, (err, raw) => - cb(err, raw.toString("hex") + file.originalname) + cb(err, raw.toString("hex") + file.originalname), ) }, }), @@ -108,7 +108,7 @@ class Ogre { "Content-Type", "forcePlainText" in b ? "text/plain; charset=utf-8" - : "application/json; charset=utf-8" + : "application/json; charset=utf-8", ) if ("forceDownload" in b) res.attachment() diff --git a/package.json b/package.json index e639f45..d54d588 100644 --- a/package.json +++ b/package.json @@ -34,29 +34,29 @@ "express": "^4.18.2", "express-promise-router": "^4.1.1", "multer": "1.4.5-lts.1", - "ogr2ogr": "^4.0.1" + "ogr2ogr": "^5.0.0" }, "devDependencies": { - "@types/blue-tape": "^0.1.33", - "@types/body-parser": "^1.19.2", - "@types/cors": "^2.8.13", - "@types/express": "^4.17.17", - "@types/multer": "^1.4.7", - "@types/node": "^18.14.6", - "@types/supertest": "^2.0.12", - "@typescript-eslint/eslint-plugin": "^5.54.0", - "@typescript-eslint/parser": "^5.54.0", + "@types/blue-tape": "^0.1.36", + "@types/body-parser": "^1.19.5", + "@types/cors": "^2.8.17", + "@types/express": "^4.17.21", + "@types/multer": "^1.4.11", + "@types/node": "^20.11.5", + "@types/supertest": "^6.0.2", + "@typescript-eslint/eslint-plugin": "^6.19.1", + "@typescript-eslint/parser": "^6.19.1", "blue-tape": "^1.0.0", - "eslint": "^8.35.0", - "eslint-config-prettier": "^8.6.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", "nyc": "^15.1.0", - "prettier": "^2.8.4", - "prettier-plugin-organize-imports": "^3.2.2", - "supertest": "^6.3.3", - "ts-node": "^10.9.1", - "typescript": "^4.9.5" + "prettier": "^3.2.4", + "prettier-plugin-organize-imports": "^3.2.4", + "supertest": "^6.3.4", + "ts-node": "^10.9.2", + "typescript": "^5.3.3" }, "engines": { - "node": ">=12" + "node": ">=16" } } diff --git a/public/index.html b/public/index.html index d385a6a..ec554f6 100644 --- a/public/index.html +++ b/public/index.html @@ -1,4 +1,4 @@ - + Ogre - ogr2ogr web client diff --git a/tsconfig.json b/tsconfig.json index 8eaa7e5..feb383a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,7 @@ "declaration": true, "outDir": "./dist", "esModuleInterop": true, - "resolveJsonModule": true + "resolveJsonModule": true, }, - "exclude": ["node_modules", "dist"] + "exclude": ["node_modules", "dist"], }