Skip to content

Commit 4640b4f

Browse files
Document updating a pinned frameworkVersion in the v4 upgrade guide
1 parent 75434dd commit 4640b4f

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

docs/guides/upgrading-to-v4.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,30 @@ These commands were deprecated (and broken) in v3 and are removed in v4:
4646

4747
## Breaking changes
4848

49+
### Update a pinned `frameworkVersion`
50+
51+
If your `serverless.yml` pins `frameworkVersion` to a v3 range, **every osls command fails immediately** after upgrading, with `FRAMEWORK_VERSION_MISMATCH`:
52+
53+
```
54+
Error: The osls version (4.0.0) does not satisfy the "frameworkVersion" (3) in serverless.yml
55+
```
56+
57+
Update the pin to a v4 range:
58+
59+
**Before (v3):**
60+
61+
```yaml
62+
frameworkVersion: '3'
63+
```
64+
65+
**After (v4):**
66+
67+
```yaml
68+
frameworkVersion: '4'
69+
```
70+
71+
The same applies to narrower ranges — replace pins such as `^3.38.0`, `>=3.0.0 <4.0.0`, or an exact `3.x.y` version with their v4 equivalents (for example `^4.0.0`). This check runs before configuration validation, so it cannot be relaxed with `configValidationMode: warn`; the pin has to match the installed version. See [Version Pinning](./services.md#version-pinning).
72+
4973
### Configuration validation defaults to `error`
5074

5175
In v4, invalid `serverless.yml` configuration **fails the command by default** (`configValidationMode: error`). In older v3 setups that never set this property, invalid configuration often surfaced only as warnings.

0 commit comments

Comments
 (0)