From 1b5dcab1a9a758b93b84fd13297592bd3b6f54d5 Mon Sep 17 00:00:00 2001 From: Eric Severance Date: Mon, 8 May 2023 18:11:45 -0700 Subject: [PATCH] Use require for importing fs --- .github/update_release_notes.js | 6 +++--- pyproject.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/update_release_notes.js b/.github/update_release_notes.js index b43565fc..e0708c23 100644 --- a/.github/update_release_notes.js +++ b/.github/update_release_notes.js @@ -1,15 +1,15 @@ // Replace ${VARIABLES} in the RELEASE_NOTES_TEMPLATE.md file. // Used by .github/workflows/publish.yml. -import { readFile } from 'node:fs/promises'; +const fsp = require('fs').promises; module.exports = async ({github, context, process}) => { const fileOpts = { encoding: 'utf8' }; - let template = await readFile(process.env.TEMPLATE_FILE, fileOpts); + let template = await fsp.readFile(process.env.TEMPLATE_FILE, fileOpts); for (const [key, value] of Object.entries(process.env)) { template = template.replaceAll(`\${${key}}`, value); } - let hashes = await readFile(process.env.SHA256SUM_TXT, fileOpts); + let hashes = await fsp.readFile(process.env.SHA256SUM_TXT, fileOpts); hashes = hashes.trim() template = template.replace('${SHA256SUM}', hashes); diff --git a/pyproject.toml b/pyproject.toml index 570f9c36..3accf7ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pywemo-esev" -version = "0.9.1rc16" +version = "0.9.1rc17" description = "Lightweight Python module to discover and control WeMo devices" authors = ["Eric Severance "] license = "MIT"