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: fastly.sdkVersion implementation #776

Merged
merged 3 commits into from May 13, 2024
Merged

feat: fastly.sdkVersion implementation #776

merged 3 commits into from May 13, 2024

Conversation

guybedford
Copy link
Contributor

@guybedford guybedford commented May 8, 2024

This implements a new fastly.sdkVersion property as well as an equivalent import { sdkVersion } from 'fastly:experimental' version property.

This is immediately useful in the StarlingMonkey builds to be able to easily inspect if we are in a StarlingMonkey build by checking fastly.sdkVersion === 'starlingmonkey-dev', which allows smoothing over any test handling edge cases more easily.

It's included in the types as a hidden property that is experimental. The engine build for the main runtime is set to the next patch version with a -dev suffix.

We will need to ensure we update this definition for each version release.

Resolves #775.

@guybedford
Copy link
Contributor Author

@elliottt as discussed today, I've renamed this to sdkVersion. Ready for review.

@guybedford guybedford changed the title feat: fastly.version implementation feat: fastly.sdkVersion implementation May 10, 2024
Copy link
Contributor

@elliottt elliottt left a comment

Choose a reason for hiding this comment

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

Looks great to me!

@@ -32,6 +32,8 @@ const JSErrorFormatString js_ErrorFormatString[JSErrNum_Limit] = {

#include "host_interface/host_api.h"

#define RUNTIME_VERSION "3.13.2-dev"
Copy link
Contributor

Choose a reason for hiding this comment

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

We talked about this briefly earlier, but it would be great to figure out how to get release-please to keep this in sync.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will follow up as soon as I've worked out the release process.

@guybedford guybedford merged commit 3eb5a8f into main May 13, 2024
18 checks passed
@guybedford guybedford deleted the fastly-version branch May 13, 2024 18:16
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.

Support for checking the runtime version
2 participants