Releases: tommy351/kosko
@kosko/[email protected]
Patch Changes
-
#73
b6183c3
Thanks @tommy351! - AddsideEffect: false
topackage.json
. -
Updated dependencies [
b6183c3
]:- @kosko/[email protected]
@kosko/[email protected]
Minor Changes
-
#73
5c09694
Thanks @tommy351! - SupportPromise
ingenerate
andresolve
function. -
#73
35c5ce8
Thanks @tommy351! - Update the type ofPrintOptions.writer
. The type becomes a simplifiedWriter
interface instead of the Node.js stream type.
Patch Changes
-
#73
b6183c3
Thanks @tommy351! - AddsideEffect: false
topackage.json
. -
Updated dependencies [
b6183c3
]:- @kosko/[email protected]
@kosko/[email protected]
Major Changes
-
#73
b90c724
Thanks @tommy351! - Add support for browser. Several APIs were introduced in this release.Loader
interfacecreateEnvironment
functioncreateAsyncEnvironment
functioncreateNodeCJSEnvironment
functioncreateNodeESMEnvironment
functioncreateSyncEnvironment
functioncreateSyncLoaderReducers
functioncreateAsyncLoaderReducers
function
The following example shows how to use this package in browsers.
import env, { createLoaderReducers } from "@kosko/env"; env.setReducers(reducers => [ ...reducers, ...createAsyncLoaderReducers({ global: () => import("./environments/dev/index.js").then(mod => mod.default), component: name => import(`./environments/dev/${name}.js`).then(mod => mod.default) }) ]);
BREAKING CHANGES: The following APIs were changed in this release.
Environment
class →Environment
interfaceSyncEnvironment
class →createNodeCJSEnvironment
functionAsyncEnvironment
class →createNodeESMEnvironment
function
You don't have to change anything, unless you initialize these classes manually.
// Before const { Environment } = require("@kosko/env"); const env = new Environment(process.cwd()); // After const { createNodeCJSEnvironment } = require("@kosko/env"); const env = createNodeCJSEnvironment({ cwd: process.cwd() });
Patch Changes
-
#73
b6183c3
Thanks @tommy351! - AddsideEffect: false
topackage.json
. -
Updated dependencies [
b6183c3
]:- @kosko/[email protected]
@kosko/[email protected]
@kosko/[email protected]
Patch Changes
-
#73
b6183c3
Thanks @tommy351! - AddsideEffect: false
topackage.json
. -
Updated dependencies [
b6183c3
,2718ffe
,5c09694
,35c5ce8
]:- @kosko/[email protected]
- @kosko/[email protected]
- @kosko/[email protected]
- @kosko/[email protected]