Azure / azure-functions-nodejs-worker

The Node.js worker for the Azure Functions runtime - https://functions.azure.com
MIT License
107 stars 44 forks source link

Publish types regularly to NPM #282

Closed dcollien closed 4 years ago

dcollien commented 4 years ago

The last publish of @azure/functions to NPM was reportedly 9 months ago: https://www.npmjs.com/package/@azure/functions

NPM: v1.0.3 Current: v1.2.0

As such, newer updates (e.g. Cookies typedef) are not available

It'd be great if there was a more frequent publish schedule for this NPM package to keep it up to date with what's in the repo.

Repro steps

e.g. import { Cookie } from "@azure/functions" reports: node_modules/@azure/functions/Interfaces"' has no exported member 'Cookie'.

Known workarounds

Referencing the git repo instead of NPM package in package.json might work?

or copy-pasting the typedefs out of the source code into your own module definitions, if you're so inclined (🤢)

dcollien commented 4 years ago

N.B. I'm unable to work out how to reference the subdir in package.json, this is as far as I got with NPM: https://github.com/npm/npm/issues/2974 and with yarn: https://github.com/yarnpkg/yarn/issues/4725 to no avail.

A method like: https://github.com/ramasilveyra/gitpkg looks like a potential solution, if there's any reason to hold off from NPM releases, but still making the latest available in your own project via package.json

Is there something I'm missing?

mhoeger commented 4 years ago

@dcollien - Oof so sorry! Just published a newer version and keeping this issue to track adding this to our release flow.

dcollien commented 4 years ago

Thanks very much Marie!