Skip to content

Commit ef998bb

Browse files
committed
docs(changeset): Move azure deps to peerDeps
1 parent e93f397 commit ef998bb

File tree

7 files changed

+46
-35
lines changed

7 files changed

+46
-35
lines changed

.changeset/eleven-papers-play.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@storybooker/azure-functions": minor
3+
"@storybooker/adapter-azure": minor
4+
"@storybooker/adapter-fs": minor
5+
---
6+
7+
Move azure deps to peerDeps

packages/adapter-azure/package.json

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@
2626
},
2727
"sideEffects": false,
2828
"exports": {
29-
".": {
30-
"source": "./src/index.ts",
31-
"import": "./dist/index.js",
32-
"require": "./dist/index.cjs"
33-
},
3429
"./blob-storage": {
3530
"source": "./src/blob-storage.ts",
3631
"import": "./dist/blob-storage.js",
@@ -62,29 +57,41 @@
6257
"lint:fix": "yarn lint --fix",
6358
"start": "func start"
6459
},
65-
"dependencies": {
60+
"dependencies": {},
61+
"devDependencies": {
6662
"@azure/cosmos": "^4.5.1",
6763
"@azure/data-tables": "^13.0.0",
6864
"@azure/storage-blob": "^12.0.0",
69-
"@storybooker/core": "workspace:^"
70-
},
71-
"devDependencies": {
65+
"@storybooker/core": "workspace:^",
7266
"@types/node": "^22.0.0",
7367
"@typescript/native-preview": "^7.0.0-dev.20250823.8",
7468
"oxlint": "^1.12.0",
7569
"oxlint-tsgolint": "^0.0.4",
7670
"prettier": "^3.6.2",
7771
"tsdown": "^0.14.1"
7872
},
73+
"peerDependencies": {
74+
"@azure/cosmos": "^4.5.1",
75+
"@azure/data-tables": "^13.0.0",
76+
"@azure/storage-blob": "^12.0.0",
77+
"@storybooker/core": "workspace:^"
78+
},
79+
"peerDependenciesMeta": {
80+
"@azure/cosmos": {
81+
"optional": true
82+
},
83+
"@azure/data-tables": {
84+
"optional": true
85+
},
86+
"@azure/storage-blob": {
87+
"optional": true
88+
}
89+
},
7990
"main": "./dist/index.cjs",
8091
"module": "./dist/index.js",
8192
"types": "./dist/index.d.cts",
8293
"publishConfig": {
8394
"exports": {
84-
".": {
85-
"import": "./dist/index.js",
86-
"require": "./dist/index.cjs"
87-
},
8895
"./blob-storage": {
8996
"import": "./dist/blob-storage.js",
9097
"require": "./dist/blob-storage.cjs"

packages/adapter-azure/src/index.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/adapter-azure/tsdown.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineConfig } from "tsdown";
33
export default defineConfig({
44
dts: { tsgo: true },
55
entry: [
6-
"./src/index.ts",
76
"./src/blob-storage.ts",
87
"./src/cosmosdb.ts",
98
"./src/data-tables.ts",

packages/adapter-fs/package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,19 @@
4141
"lint:fix": "yarn lint --fix",
4242
"start": "func start"
4343
},
44-
"dependencies": {
45-
"@storybooker/core": "workspace:^"
46-
},
44+
"dependencies": {},
4745
"devDependencies": {
46+
"@storybooker/core": "workspace:^",
4847
"@types/node": "^22.0.0",
4948
"@typescript/native-preview": "^7.0.0-dev.20250823.8",
5049
"oxlint": "^1.12.0",
5150
"oxlint-tsgolint": "^0.0.4",
5251
"prettier": "^3.6.2",
5352
"tsdown": "^0.14.1"
5453
},
54+
"peerDependencies": {
55+
"@storybooker/core": "workspace:^"
56+
},
5557
"main": "./dist/index.js",
5658
"module": "./dist/index.js",
5759
"types": "./dist/index.d.ts",

packages/azure-functions/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ Add following files to a Azure Functions project.
99
### `index.js`
1010

1111
```ts
12-
import {
13-
AzureBlobStorageService,
14-
AzureDataTablesDatabaseService,
15-
// AzureEasyAuthService
16-
} from "@storybooker/adapter-azure";
12+
import { AzureBlobStorageService } from "@storybooker/adapter-azure/blob-storage";
13+
import { AzureDataTablesDatabaseService } from "@storybooker/adapter-azure/data-tables";
14+
import { AzureEasyAuthService } from "@storybooker/adapter-azure/easy-auth";
1715
import { registerStoryBookerRouter } from "@storybooker/azure-functions";
1816

1917
const storageConnectionString = process.env["AzureWebJobsStorage"];
@@ -23,8 +21,10 @@ if (!storageConnectionString) {
2321
);
2422
}
2523

24+
25+
2626
registerStoryBookerRouter({
27-
// auth: new AzureEasyAuthService(authorise) // optional auth adapter
27+
auth: new AzureEasyAuthService() // optional auth adapter
2828
database: new AzureDataTablesDatabaseService(storageConnectionString),
2929
storage: new AzureBlobStorageService(storageConnectionString),
3030
});
@@ -39,6 +39,8 @@ registerStoryBookerRouter({
3939
"main": "index.js",
4040
"dependencies": {
4141
"@azure/functions": "^4.0.0",
42+
"@azure/data-tables": "^13.0.0",
43+
"@azure/storage-blob": "^12.0.0",
4244
"@storybooker/adapter-azure": "latest",
4345
"@storybooker/azure-functions": "latest"
4446
}

packages/azure-functions/start.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
// @ts-check
22

3-
import {
4-
AzureBlobStorageService,
5-
AzureDataTablesDatabaseService,
6-
} from "@storybooker/adapter-azure";
3+
import { AzureBlobStorageService } from "@storybooker/adapter-azure/blob-storage";
4+
import { AzureDataTablesDatabaseService } from "@storybooker/adapter-azure/data-tables";
75
import { registerStoryBookerRouter } from "./dist/index.js";
86

97
const storageConnectionStringEnvVar = "AzureWebJobsStorage";
10-
const storageConnectionString = process.env[storageConnectionStringEnvVar];
11-
if (!storageConnectionString) {
8+
const connectionString = process.env[storageConnectionStringEnvVar];
9+
if (!connectionString) {
1210
throw new Error(
1311
`Missing env-var '${storageConnectionStringEnvVar}' value.
1412
It is required to connect with Azure Storage resource.`,
1513
);
1614
}
1715

18-
const database = new AzureDataTablesDatabaseService(storageConnectionString);
19-
const storage = new AzureBlobStorageService(storageConnectionString);
16+
const database = new AzureDataTablesDatabaseService(connectionString);
17+
const storage = new AzureBlobStorageService(connectionString);
2018

2119
registerStoryBookerRouter({ database, storage });

0 commit comments

Comments
 (0)