Skip to content

Commit

Permalink
github actions does not support fs/promises
Browse files Browse the repository at this point in the history
  • Loading branch information
flyingeek committed Mar 13, 2024
1 parent 39a0b56 commit 0352682
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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/"
Expand Down
7 changes: 4 additions & 3 deletions scripts/makeWmo.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0352682

Please sign in to comment.