Skip to content

Commit 6487e01

Browse files
committed
fix: update "exports" to point to the right files
1 parent 7f868ed commit 6487e01

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/openfeature-node-provider/example/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import express from "express";
22
import "./bucket";
33
import { EvaluationContext, OpenFeature } from "@openfeature/server-sdk";
4-
import provider, { CreateTodosConfig } from "./bucket";
4+
import { CreateTodosConfig } from "./bucket";
55

66
// In the following, we assume that targetingKey is a unique identifier for the user.
77
type Context = EvaluationContext & {

packages/openfeature-node-provider/example/serve.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import app from "./app";
44
// Initialize Bucket SDK before starting the server,
55
// so that features are available when the server starts.
66
bucket.initialize().then(() => {
7-
console.log("Bucket initialized");
8-
97
// Start listening for requests only after Bucket is initialized,
108
// which guarantees that features are available.
119
app.listen(process.env.PORT ?? 3000, () => {

packages/openfeature-node-provider/package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,14 @@
2525
"publishConfig": {
2626
"access": "public"
2727
},
28-
"main": "./dist/src/index.js",
28+
"main": "./dist/index.js",
2929
"types": "./dist/types/index.d.ts",
30+
"exports": {
31+
".": {
32+
"types": "./dist/types/index.d.ts",
33+
"require": "./dist/index.js"
34+
}
35+
},
3036
"devDependencies": {
3137
"@babel/core": "~7.24.7",
3238
"@bucketco/eslint-config": "~0.0.2",

0 commit comments

Comments
 (0)