infinitered/gluegun

checkForUpdates is not a function

joebochill opened this issue ยท 8 comments

I'm reading through the tutorials, and so far i'm really liking the tool, but I ran into a snag trying to get checkForUpdates (https://infinitered.github.io/gluegun/#/runtime?id=checkforupdates) to work.

Typescript complains that 'checkForUpdates does not exist on type Builder' and sure enough, a global search of the gluegun node_modules folder reveals that it's not defined anywhere in the package.

Am i missing something, or was this functionality recently removed?

gluegun version: 3.3.3
node version: 10.16.0

Screen Shot 2019-08-17 at 9 39 31 AM

Hey @joebochill ! Sorry about the delay.

It is defined here:

public checkForUpdates(frequency: number): Builder {
this.data.checkUpdate = Math.floor(Math.random() * 100) + 1 < frequency
return this
}

Maybe check your Gluegun version? It was added in 3.3.0.

Wait, you said your version is 3.3.3. That's very odd.

I added Gluegun and it does seem to be in the build?

image

I'm also seeing it in TypeScript:

image

I figured out why it's not there... I have the gluegun CLI installed globally @3.3.3, but when I use it to create a project, it's using ^2.1.0 (for JavaScript and TypeScript projects). I'm not sure if that's intended and I'm just meant to update it in my project, or if that's a bug in the CLI.

https://github.com/infinitered/gluegun/blob/master/src/cli/templates/cli/package.json.ejs#L45

@joebochill Yikes, that's a bug for sure. Would you mind submitting a PR?

I'm on it. Should be able to have something tomorrow.

๐ŸŽ‰ This issue has been resolved in version 3.3.5 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€