fix: dont use promise fs namespace for node12 support (#97)

This commit is contained in:
Adam Uhlíř 2022-05-09 11:28:27 +02:00 committed by GitHub
parent 08e6da2259
commit bef03cabc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
name: Node.js tests name: Tests
on: on:
push: push:

View File

@ -1,7 +1,6 @@
# Bee Factory # Bee Factory
[![Tests](https://github.com/ethersphere/bee-factory/actions/workflows/tests.yaml/badge.svg)](https://github.com/ethersphere/bee-factory/actions/workflows/tests.yaml) [![Tests](https://github.com/ethersphere/bee-factory/actions/workflows/test.yaml/badge.svg)](https://github.com/ethersphere/bee-factory/actions/workflows/test.yaml)
[![Dependency Status](https://david-dm.org/ethersphere/bee-factory.svg?style=flat-square)](https://david-dm.org/ethersphere/bee-factory)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fethersphere%2Fbee-factory.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fethersphere%2Fbee-factory?ref=badge_shield) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fethersphere%2Fbee-factory.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fethersphere%2Fbee-factory?ref=badge_shield)
[![](https://img.shields.io/badge/made%20by-Swarm-blue.svg?style=flat-square)](https://swarm.ethereum.org/) [![](https://img.shields.io/badge/made%20by-Swarm-blue.svg?style=flat-square)](https://swarm.ethereum.org/)
[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme) [![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

View File

@ -1,6 +1,8 @@
import { readFile } from 'fs/promises' import { readFile as readFileCb } from 'fs'
import * as path from 'path' import * as path from 'path'
import { promisify } from 'util'
const readFile = promisify(readFileCb)
const VERSION_REGEX = /^\d\.\d\.\d(-\w+)*$/ const VERSION_REGEX = /^\d\.\d\.\d(-\w+)*$/
export function stripCommit(version: string): string { export function stripCommit(version: string): string {