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

feat: revisioning info moved to its own file #274

Merged
merged 12 commits into from
Mar 10, 2024
Merged

feat: revisioning info moved to its own file #274

merged 12 commits into from
Mar 10, 2024

Conversation

fahad19
Copy link
Member

@fahad19 fahad19 commented Mar 8, 2024

Background

Featurevisor's build system relied on the version found in package.json for the generated datafiles' revision property.

Links for further understanding:

Challenges

For every new successful build, it meant incrementing the version number as found in package.json.

Many npm projects rely on caching their dependencies, and the cache is busted if the hash of package.json and/or package-lock.json changes.

If we keep updating the version in package.json for every build, this way of caching becomes redundant. We don't want that.

Solution

Now the revision info is stored next to state files in .featurevisor/REVISION file.

This will contain a numeric value, which will be incremented by every build.

And package.json remains untouched and unused going forward, leaving you with the choice to adopt a caching strategy for your npm dependencies the way you want.

Backwards compatibility

Those who have been following our deployment guide with GitHub Actions and/or Cloudflare Pages before, it will maintain backwards compatibility by:

  • taking the last known version from package.json
  • using that as a base and create a new .featurevisor/REVISION file
  • and use the new file going forward

How to upgrade?

If you have been following our deployment guidelines, then it's really nothing more than a version upgrade for @featurevisor/cli for you.

But you may want to tweak your pipeline (like GitHub Actions workflows) to benefit from this change.

TODOs

@fahad19 fahad19 self-assigned this Mar 8, 2024
@fahad19 fahad19 marked this pull request as ready for review March 8, 2024 18:31
@fahad19 fahad19 merged commit 6a175d1 into main Mar 10, 2024
1 check passed
@fahad19 fahad19 deleted the revision-file branch March 10, 2024 18:42
fahad19 added a commit that referenced this pull request Mar 10, 2024
* main:
  docs: Fastify integration (#270)
  docs: add Roku SDK documentation (#272)
  docs: fix code block
  v1.11.0
  feat: revisioning info moved to its own file (#274)
  v1.10.1
  fix: init command (#277)
  v1.10.0
  feat: allow showing only failed specs in test runner (#276)
  v1.9.0
  feat: allow printing datafile per environment (#275)
  docs: updated next js docs to include app router example (#268)
  v1.8.0
  feat: allow option to test by generating datafiles early (#267)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant