diff --git a/CHANGELOG.md b/CHANGELOG.md index 37a6dd68..f2247542 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixes + +- Added an `index.ts` file to the `scalefunc` and `log` packages in TypeScript to make importing them more ergonomic + ## [v0.4.5] - 2023-10-09 ### Features diff --git a/integration/integration.test.ts b/integration/integration.test.ts index be146903..d2573cf8 100644 --- a/integration/integration.test.ts +++ b/integration/integration.test.ts @@ -14,7 +14,7 @@ limitations under the License. */ -import { ScaleFunc } from "../scalefunc/scalefunc"; +import { ScaleFunc } from "../scalefunc"; import { New as NewScale } from "../scale"; import fs from "fs"; diff --git a/log/index.ts b/log/index.ts new file mode 100644 index 00000000..df193aa6 --- /dev/null +++ b/log/index.ts @@ -0,0 +1,17 @@ +/* + Copyright 2022 Loophole Labs + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +export * from "./log"; diff --git a/log/log.ts b/log/log.ts index 4db88e36..fd027166 100644 --- a/log/log.ts +++ b/log/log.ts @@ -14,7 +14,7 @@ limitations under the License. */ -import {Writer} from "../config"; +import {Writer} from "scale"; export function NamedLogger(name: string, writer: Writer): Writer { return (message: string) => { diff --git a/module.ts b/module.ts index 813fb88e..b32f71f2 100644 --- a/module.ts +++ b/module.ts @@ -21,7 +21,7 @@ import {UnpackUint32} from "./utils"; import {Decoder} from "@loopholelabs/polyglot"; import {DisabledWASI} from "./wasi"; import {v4 as uuid} from "uuid"; -import {NamedLogger} from "./log/log"; +import {NamedLogger} from "./log"; import {Tracing} from "./tracing"; export async function NewModule(template: Template): Promise> { diff --git a/scalefunc/index.ts b/scalefunc/index.ts new file mode 100644 index 00000000..c21b87f7 --- /dev/null +++ b/scalefunc/index.ts @@ -0,0 +1,17 @@ +/* + Copyright 2022 Loophole Labs + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +export * from "./scalefunc";