Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usage notes #31

Open
nathanjhood opened this issue Oct 3, 2024 · 2 comments
Open

usage notes #31

nathanjhood opened this issue Oct 3, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@nathanjhood
Copy link
Owner

nathanjhood commented Oct 3, 2024

Published to npm registry under version 0.0.1

Now, it is possible to yarn add @nathanjhood/esbuild-scripts.

Reason: the package was not installing correctly when acquired over git.

The problems were numerous, and no fun to debug, since they only happened over remote CI runs and never locally.

I was trying to consume the package via git+ssh://[email protected]/nathanjhood/esbuild-scripts, but the CI doesn't have the access without generating a token...

When changing to https://github.com/nathanjhood/esbuild-scripts for the package link, suddenly the pipeline failed at the point of yarn install... I was just about able to determine that I should not have been using prepare as mentioned in a recent PR, because this was somehow causing esbuild-scripts to do its' own install in its' own directory, under node_modules... there were multiple instances of packages being linked, etc... messy! All of which worked locally, but not remotely... (actions cache was not finding the "sub"-packages for esbuild-scripts to build itself locally)

In the end, I figured it best to clean up and publish what I have (only the build script, currently) - because I was otherwise facing a major (major) Catch 22 over the following:

  • can't proceed development with confidence until I've tried consuming the package and using some basic functionality to be assured that the deployment isn't somehow fundamentally broken (special concern: import/export syntax and TS)
  • can't consume the package and validate it if there is no functionality to validate

So, I will come up with a versioning strategy to allow actual supported minor releases (and hopefully tweak releases), but try to keep some scope for experimental releases, which are required in order to test this particular project and thus validate that the update is good for the more regular consumers.

I've deliberately not strayed far up from the semver 0.0.0 so far; the version in the npm registry is 0.0.1, and I'll likely suggest any potential users to pick up minor version increments - 0.1.0, then 0.2.0, and so forth, leaving the third digit for beta testing.

Once I've established a suitable plan, I'll post it here and in the README.

@nathanjhood
Copy link
Owner Author

nathanjhood commented Oct 3, 2024

It doesn't sit right with me, to have to publish experimental builds to the npm registry, where it is impossible to unpublish, just to test my project. Not least of all, if anybody were to try it out themselves without being aware of experimental release versions.

I believe that it would be possible to acquire esbuild-scripts over git instead from the npm registry now, since I removed the prepare command. I think that this command was the culprit of my test project's CI failures.

On the other hand, then you'd have to cd into the node_modules/@nathanjhood/esbuild-scripts directory yourself, run the build command, and link the CLI back to the bin directory.

I could add postinstall but this did not seem to work in previous tests, when I was consuming the package locally. Now that the mechanism has changed (I'm test-consuming from the npm registry instead of locally), this might give a different result.

As if learning ECMA, TS modules, NodeJS and browser, React/React-DOM/React-Native-Web, WebPack, and ESBuild wasn't enough fun, here comes npm to really spoil us at the finishing line! 😆

@nathanjhood nathanjhood self-assigned this Oct 3, 2024
@nathanjhood nathanjhood pinned this issue Oct 3, 2024
@nathanjhood nathanjhood added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested labels Oct 3, 2024
@nathanjhood
Copy link
Owner Author

Added:

  • start command - starts a hot-reloading dev server on localhost:3000 using http

(will be expanded)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant