RobotWebTools / roslibjs

The Standard ROS JavaScript Library
https://robotwebtools.github.io/roslibjs
Other
659 stars 372 forks source link

Split `publish` NPM hook into `prepublishOnly` and `prepare` #715

Closed EzraBrooks closed 2 months ago

EzraBrooks commented 2 months ago

Public API Changes

None.

Description

Closes #714. Currently, installing this package via Git triggers some unwanted lifecycle hooks. This makes npm or pnpm install roslib@github:RobotWebTools/roslibjs#develop work.

EzraBrooks commented 2 months ago

@ramiCMT does installing this branch via NPM work for you? it seems to work for me via PNPM.

RamiCMT commented 2 months ago

@RamiCMT does installing this branch via NPM work for you? it seems to work for me via PNPM.

This is what I'm seeing: image

I may need to update my import syntax, I will circle back if I can get that working...

EzraBrooks commented 2 months ago

That output should work without the src directory; There's no reference to src in the package.json's entrypoints. Are you not able to require/import this into your application for some reason?

RamiCMT commented 2 months ago

That output should work without the src directory; There's no reference to src in the package.json's entrypoints. Are you not able to require/import this into your application for some reason?

The proposed changes work! :)

I had to update some of my imports - seems like 'ServiceRequest' and 'Message' objects are no longer required

Thanks for the help!!

EzraBrooks commented 2 months ago

Correct, we removed those interstitial types since they were just syntactic sugar around user-provided types and made it hard to implement TypeScript generics for the services, topics, etc.

Glad I could help!

MatthijsBurgh commented 2 months ago

@EzraBrooks what is the new release procedure?

update: The npm docs from #714 explained these changes.