All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
6.2.0 - 2024-11-27
- Scaffolded application now uses @fastly/cli npm package to access the Fastly CLI
- Improved README to clarify command line args syntax
- Improved README to clarify KV Store mode usage
- Improved README to clarify application generation and iteration
6.1.1 - 2024-10-03
- fix: Windows compatibility issues (JohanLi)
- fix: allow for dots in KV Store name (NeilHanlon)
6.1.0 - 2024-03-22
- feat: add getJson() to ContentAsset
6.0.0 - 2024-01-26
- Add "static content root dir" to cleanly separate generated files
5.2.1 - 2023-11-14
- Apply "Compute" branding change.
5.2.0 - 2023-09-19
- Use
@fastly/js-compute@3
for dev - Make generated project use
@fastly/js-compute@3
5.1.2 - 2023-09-19
- Added support for
@fastly/js-compute
3.0.0
5.1.1 - 2023-07-06
- Fix: Specify full path in import directives in generated files to allow use in projects with "type": "module".
5.1.0 - 2023-06-12
- Fix: Correct package.json created by init-app to reference fastly/js-compute@2 (#8)
5.0.2 - 2023-05-25
- README updates
5.0.1 - 2023-05-19
- Avoid a crash caused by extra output when
fastly
CLI tool detects a newer available version.
5.0.0 - 2023-05-19
- Update to [email protected]
- BREAKING: To correspond with Fastly's finalization of the name of KV Store, all references have been updated to that naming.
4.2.1 - 2023-05-06
- Fix parsing of contentTypes[] in static-publish.rc.js
4.2.0 - 2023-04-26
- Avoid a crash when the project doesn't have devDependencies in package.json.
4.1.0 - 2023-04-05
- Added 'bytes' and 'string' content asset types usable during testing.
- AssetManager: added
getAssetKeys
method - ContentAsset: added
isLocal
property
- Modified metadata to use string identifiers such as 'wasm-inline' and 'object-store' instead of a single "isInline" boolean value. This allows other stores to be used during tests.
- Compute-Js Content Assets ('wasm-inline' and 'object-store') are only included when
@fastly/compute-js-static-publish/build/compute-js
is imported.
- Fixed type of imported metadata file in clean-object-store program.
4.0.0 - 2023-03-23
- Cleaner separation between Content Assets and Module Assets: applications can define which files generate which type of asset.
- Object Store mode: Content Assets can selectively be uploaded to and served from the Object Store, allowing the Wasm binary to be much smaller.
- Defined
StoreEntry
, a common interface that can be used to stream data from content assets, regardless of whether that data exists inlined into the Wasm artifact or uploaded to Object Store. - Added support for Brotli and Gzip compression. These assets are pre-compressed at publish time and uploaded alongside their raw counterparts, rather than using runtime compression. This feature is enabled automatically if Object Store mode is used, and can be selectively enabled otherwise.
- Added support for returning
304 Not Modified
status based onIf-None-Match
andIf-Modified-Since
request headers. - A
PublisherServer
class that maps incoming requests to asset paths. - Content and metadata available to your application.
- Load JavaScript module assets as code into your Compute JavaScript application.
clean-object-store
mode can be used to remove no-longer-used entries from the Object Store.- Moved Migration Guide into its own separate file with even more information.
- Exported
getObjectStoreKeysFromMetadata()
metadata handling utility from main package. - Exported
getDefaultContentTypes()
and other content type utilities from main package. - Added preset for Vue (https://vuejs.org/).
- Added preset for Astro (https://astro.build/).
- Webpack is no longer required as a dependency, and is disabled by default. If you wish to use Webpack, you can enable
it through the
--webpack
command line option during project scaffolding. - No longer uses Expressly to route requests.
index.js
has been simplified using thePublisherServer
class instead. - Separated
--root-dir
and--public-dir
. The public directory is now aPublisherServer
configuration that represents the subset of the published files that map to the web root. This effectively adds the ability to include files in the publishing that aren't accessible from the web (at least throughPublisherServer
). static-publish.rc.js
cleaned up:- Items related to including/excluding files reorganized;
PublisherServer
-specific settings moved toserver
key.
- Moved default content types into the main package.
- Updated to TypeScript 5
3.6.0 - 2023-02-28
-
Made testing against default content types easier
-
Exported types for default-content-types.cjs
It's now possible to do something like this:
import { defaultContentTypes, testFileContentType } from "@fastly/compute-js-static-publish/resources/default-content-types"; const testResult = testFileContentType(defaultContentTypes, '/path/to/file.json'); testResult.binary // false testResult.type // application/json
3.5.0 - 2023-02-24
- Update generated package.json and fastly.toml to recommended setup
- Updated documentation on migration
3.4.0 - 2023-02-16
- SPA and 404 files were being left out
- Corrected typing of loadModule function
3.3.0 - 2023-02-16
- Make assets map available on the StaticAssets object.
- In addition to exporting module assets as static
import
statements, they can alternatively be exported asimport()
calls. At the current time, this feature requires a bundler that supports theimport()
function, such as Webpack.
3.2.1 - 2023-01-30
- Export additional TypeScript types: AssetBase, StringAsset, and Binary Asset
3.2.0 - 2023-01-13
- Added
type
field that had been missing from asset entry - Content for binary files is now typed as
Uint8Array
rather thanArrayBuffer
3.1.0 - 2023-01-11
- Generate statics.d.ts alongside static.js helpful for TypeScript
- Export Config type to describe shape of static-publish.rc.js
- Generated static files have descriptive notice
3.0.1 - 2022-12-23
- Updated generated app to @fastly/[email protected]
3.0.0 - 2022-12-23
- Updated to @fastly/[email protected]
- Updated generated app to @fastly/[email protected]
- Updated generated app to @fastly/[email protected]
- Improve mechanism of serving static files by copying them into the static content dir and using
includeBytes()
, rather than using asset modules
- Enable minimize in
webpack.config.js
2.4.2 - 2022-12-21
- auto-index now also applies to request paths that do not have a trailing slash
2.4.1 - 2022-12-02
- Added missing devDependency to
@fastly/compute-js-static-publish
2.4.0 - 2022-12-02
- Updated to [email protected]
- Updated generated app to [email protected]
- Updated generated app's webpack and webpack-cli versions
- Use atob() and removed dependency on Buffer