Upgrading shelf_static 0.2 to 1
Breaking0.2.9+2 → 1.2.0Breaking1Platform1New3Changed7Fixed2Other5
BreakingUpgrade verdict
1 breaking change and a platform requirement change.
In plain terms
- Remove trailing slash requirement when using mount.
- You must use Dart 3.9.0 or newer to use this version.
Must act 2 items need code or config changes
Dart SDK requirement changed in 1.2.0: >=2.3.0 <3.0.0 → ^3.9.0.
What you must change
Breaking1
Remove trailing slash requirement when using mount.
mountPlatform1
Requires Dart ^3.9.0.
API changes
Generated by DepDelta from published Dart source. Not mixed with prose notes.
- changed:
function createFileHandler(String path, {String url, String contentType}): Handler → function createFileHandler( String path, { String? url, String? contentType, FutureOr<String?> Function(File, FileStat)? generateETag, Duration? maxAge, }): Handler - changed:
function createStaticHandler(String fileSystemPath, {bool serveFilesOutsidePath = …, String defaultDocument, bool listDirectories = …, bool useHeaderBytesForContentType = …, MimeTypeResolver contentTypeResolver}): Handler → function createStaticHandler( String fileSystemPath, { bool serveFilesOutsidePath = …, String? defaultDocument, bool listDirectories = …, bool useHeaderBytesForContentType = …, MimeTypeResolver? contentTypeResolver, FutureOr<String?> Function(File, FileStat)? generateETag, Duration? maxAge, }): Handler