Skip to content

Conversation

@motiz88
Copy link
Contributor

@motiz88 motiz88 commented Jun 30, 2025

Closes #50.

  • Basic structure of the package
  • Publish under a temporary name (@motizilberman/dotslash)
    • Done using npm run build -- --version 0.5.7 --prerelease
  • Test on all platforms
  • Iterate on README and test the workflows described there
  • Add docs
  • Set up GitHub Action for publishing to npm on every release
  • Add Flow and TypeScript definition files for convenience
  • Decide on a final package name and publish a non-prerelease version
    • We can either ask npm nicely to free up dotslash - currently unavailable because of dot-slash, a package last published 10 years ago with 5 weekly downloads - or go with e.g. fb-dotslash (which I have reserved).
    • --> fb-dotslash
  • Transfer package to Meta
    • --> added fb as a maintainer

Possible follow-up scope (definitely not in this PR):

  • Add an optional postinstall script that replaces bin/dotslash with a symlink to the correct binary, thus making DotSlash'd tools start even faster in environments that respect postinstall scripts.

How to publish the package

cd node
npm ci
npm run lint
npm run build -- --tag v$RELEASED_DOTSLASH_VERSION # add --prerelease for testing
npm publish

@facebook-github-bot
Copy link
Contributor

@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this in D79818880. (Because this pull request was imported automatically, there will not be any future comments.)

@motiz88 motiz88 force-pushed the motiz88-package branch 2 times, most recently from b0be96d to db5d091 Compare August 9, 2025 15:24
@motiz88
Copy link
Contributor Author

motiz88 commented Aug 9, 2025

Publishing as this is reasonably ready for review. In addition to reviewing, I'll need a maintainer to:

  1. Make a decision on the package name.
  2. If necessary, reach out to npm about freeing up the dotslash package name.
  3. Action the package ownership transfer.

We should then update all references to @motizilberman/dotslash in this branch to whatever the final name is, merge, and run a release to make sure the automation is working end-to-end.

As a heads up, my team will start using this npm package (published manually as @motizilberman/dotslash) soon, e.g. in facebook/react-native#52930. We'd of course be more than happy to migrate to the "official" version of the package once that is published.

@motiz88 motiz88 marked this pull request as ready for review August 9, 2025 15:36
@motiz88
Copy link
Contributor Author

motiz88 commented Aug 9, 2025

cc @bigfootjon

@bigfootjon
Copy link
Member

Make a decision on the package name.

lets do fb-dotslash

Action the package ownership transfer.

First step is to add fb to the package as an owner, ping me on workchat for the rest of the process

Summary:
Closes facebook#50.

- [x] Basic structure of the package
- [x] Publish under a temporary name ([`motizilberman/dotslash`](https://www.npmjs.com/package/motizilberman/dotslash))
  - Done using `npm run build -- --version 0.5.7 --prerelease`
- [x] Test on all platforms
- [x] Iterate on README and test the workflows described there
- [x] Add docs
- [x] Set up GitHub Action for publishing to npm on every release
- [x] Add Flow and TypeScript definition files for convenience
- [x] Decide on a final package name and publish a non-prerelease version
  - ~We can either ask npm nicely to free up `dotslash` - currently unavailable because of [`dot-slash`](https://www.npmjs.com/package/dot-slash), a package last published 10 years ago with 5 weekly downloads - or go with e.g. `fb-dotslash` (which I have [reserved](https://www.npmjs.com/package/fb-dotslash)).~
  - --> `fb-dotslash`
- [x] Transfer package to Meta
  - --> added `fb` as a maintainer

Possible follow-up scope (definitely not in this PR):
- Add an *optional* postinstall script that replaces `bin/dotslash` with a symlink to the correct binary, thus making DotSlash'd tools start even faster in environments that respect postinstall scripts.


## How to publish the package

```
cd node
npm ci
npm run lint
npm run build -- --version $RELEASED_DOTSLASH_VERSION # add --prerelease for testing
npm publish
```


Differential Revision: D79818880

Pulled By: motiz88
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D79818880

@motiz88
Copy link
Contributor Author

motiz88 commented Aug 18, 2025

@bigfootjon: I've implemented the requested changes and fixed lint errors. I've also created a test branch and tag on facebook/dotslash to test the workflow, and it seems configuring the NPM auth token for fb is the last remaining piece (see logs).

Copy link
Member

@bigfootjon bigfootjon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@motiz88
Copy link
Contributor Author

motiz88 commented Aug 19, 2025

I've now set up the npm token as a secret in this repo, updated my test branch and pushed a new test tag --> the package got published correctly:

This should therefore be safe to merge, and will take effect from the next release of DotSlash.

@facebook-github-bot
Copy link
Contributor

@motiz88 merged this pull request in 18deb7c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC] Should there be an npm module for the dotslash executable?

3 participants