From 003cd1f3a8299beea1eee1399a75202375ffc3b5 Mon Sep 17 00:00:00 2001 From: Joris Buchou Date: Fri, 3 Jan 2025 08:42:39 -0800 Subject: [PATCH] Remove gen-flow file and bump major version --- gen-flow.js | 27 --------------------------- package.json | 2 +- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 gen-flow.js diff --git a/gen-flow.js b/gen-flow.js deleted file mode 100644 index ab7fb45..0000000 --- a/gen-flow.js +++ /dev/null @@ -1,27 +0,0 @@ -const {beautify, compiler} = require('flowgen') -const fs = require('fs') -const glob = require('glob') -const path = require('path') - -glob(`dist/**/*.d.ts`, {}, async (err, files) => { - if (err) console.error(err) - await Promise.all(files.map(process)) -}) - - -const process = f => - new Promise((resolve, reject) => { - const flowdef = beautify(compiler.compileDefinitionFile(f, {inexact: false})) - const p = path.parse(f) - const name = /(.*).d/.exec(p.name)[1] - const filename = `${p.dir}/${name}.js.flow` - fs.writeFile( - filename, - `// @flow -${flowdef}`, - e => { - if (e) reject(e) - else resolve() - } - ) - }) diff --git a/package.json b/package.json index 09eef22..cb7f8f6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@freckle/ajax", - "version": "2.0.0", + "version": "3.0.0", "description": "Freckle ajax helpers", "author": "Freckle", "license": "MIT",