From 0352682eac66c99bd2fc91c60aed543551112c52 Mon Sep 17 00:00:00 2001 From: Eric Delord <04-ete.elit@icloud.com> Date: Wed, 13 Mar 2024 19:14:21 +0100 Subject: [PATCH] github actions does not support fs/promises --- package.json | 2 +- scripts/makeWmo.js | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d402904..a021e1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flyingeek/lidojs", - "version": "1.6.68", + "version": "1.6.69", "description": "convert Lido OFP text files", "publishConfig": { "registry": "https://npm.pkg.github.com/" diff --git a/scripts/makeWmo.js b/scripts/makeWmo.js index 77fb9b8..ca74ffb 100644 --- a/scripts/makeWmo.js +++ b/scripts/makeWmo.js @@ -1,4 +1,5 @@ -const fs = require('fs/promises'); +/* eslint-disable no-sync */ +const fs = require('fs'); const path = require('path'); const Geohash = require('ngeohash'); const {wmoParser} = require('./wmo_parsers'); @@ -37,8 +38,8 @@ function geoEncode(data, precision=3) { return results; } -wmoParser(ogimetIds, excludedStations).then(async data => { - await fs.mkdir(path.dirname(wmoPath), {'recursive': true}); +wmoParser(ogimetIds, excludedStations).then(data => { + fs.mkdirSync(path.dirname(wmoPath), {'recursive': true}); const geohashedData = geoEncode(data); fs.writeFile(wmoPath, JSON.stringify(geohashedData), (err) => { if (err) {