@vercel/functions 3.3.1 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @vercel/functions
2
2
 
3
+ ## 3.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`77f5410794f22afb5fe3e4c204555f238c2850b3`](https://github.com/vercel/vercel/commit/77f5410794f22afb5fe3e4c204555f238c2850b3)]:
8
+ - @vercel/oidc@3.0.5
9
+
10
+ ## 3.3.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Fix `addCacheTag()` which was previously not working (no-op). ([#14241](https://github.com/vercel/vercel/pull/14241))
15
+
3
16
  ## 3.3.1
4
17
 
5
18
  ### Patch Changes
@@ -23,9 +23,9 @@ __export(addcachetag_exports, {
23
23
  module.exports = __toCommonJS(addcachetag_exports);
24
24
  var import_get_context = require("../get-context");
25
25
  const addCacheTag = (tag) => {
26
- const api = (0, import_get_context.getContext)().addCacheTag;
27
- if (api) {
28
- return api.addCacheTag(tag);
26
+ const addCacheTag2 = (0, import_get_context.getContext)().addCacheTag;
27
+ if (addCacheTag2) {
28
+ return addCacheTag2(tag);
29
29
  }
30
30
  return Promise.resolve();
31
31
  };
@@ -1,12 +1,8 @@
1
1
  /**
2
2
  * Vercel AddCacheTag API.
3
+ * A function that adds one or more tags to the cache content.
4
+ *
5
+ * @param tag One or more tags to add to the cache content.
6
+ * @returns A promise that resolves when the tag is added.
3
7
  */
4
- export interface AddCacheTagApi {
5
- /**
6
- * Add one or more tags to the cache content
7
- *
8
- * @param tag One or more tags to add to the cache content.
9
- * @returns A promise that resolves when the tag is added.
10
- */
11
- addCacheTag: (tag: string | string[]) => Promise<void>;
12
- }
8
+ export type AddCacheTagApi = (tag: string | string[]) => Promise<void>;
@@ -4,13 +4,16 @@
4
4
 
5
5
  ### Interfaces
6
6
 
7
- - [AddCacheTagApi](../interfaces/index.AddCacheTagApi.md)
8
7
  - [DangerouslyDeleteOptions](../interfaces/index.DangerouslyDeleteOptions.md)
9
8
  - [Geo](../interfaces/index.Geo.md)
10
9
  - [PurgeApi](../interfaces/index.PurgeApi.md)
11
10
  - [Request](../interfaces/index.Request.md)
12
11
  - [RuntimeCache](../interfaces/index.RuntimeCache.md)
13
12
 
13
+ ### Type Aliases
14
+
15
+ - [AddCacheTagApi](index.md#addcachetagapi)
16
+
14
17
  ### Functions
15
18
 
16
19
  - [addCacheTag](index.md#addcachetag)
@@ -28,6 +31,35 @@
28
31
  - [rewrite](index.md#rewrite)
29
32
  - [waitUntil](index.md#waituntil)
30
33
 
34
+ ## Type Aliases
35
+
36
+ ### AddCacheTagApi
37
+
38
+ Ƭ **AddCacheTagApi**: (`tag`: `string` \| `string`[]) => [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
39
+
40
+ #### Type declaration
41
+
42
+ ▸ (`tag`): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
43
+
44
+ Vercel AddCacheTag API.
45
+ A function that adds one or more tags to the cache content.
46
+
47
+ ##### Parameters
48
+
49
+ | Name | Type | Description |
50
+ | :---- | :--------------------- | :-------------------------------------------- |
51
+ | `tag` | `string` \| `string`[] | One or more tags to add to the cache content. |
52
+
53
+ ##### Returns
54
+
55
+ [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
56
+
57
+ A promise that resolves when the tag is added.
58
+
59
+ #### Defined in
60
+
61
+ [packages/functions/src/addcachetag/types.ts:8](https://github.com/vercel/vercel/blob/main/packages/functions/src/addcachetag/types.ts#L8)
62
+
31
63
  ## Functions
32
64
 
33
65
  ### addCacheTag
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "require": "./middleware.js"
31
31
  }
32
32
  },
33
- "version": "3.3.1",
33
+ "version": "3.3.3",
34
34
  "repository": {
35
35
  "directory": "packages/functions",
36
36
  "type": "git",
@@ -72,7 +72,7 @@
72
72
  "access": "public"
73
73
  },
74
74
  "dependencies": {
75
- "@vercel/oidc": "3.0.4"
75
+ "@vercel/oidc": "3.0.5"
76
76
  },
77
77
  "scripts": {
78
78
  "pretest": "pnpm run build:code",
@@ -1,39 +0,0 @@
1
- # Interface: AddCacheTagApi
2
-
3
- [index](../modules/index.md).AddCacheTagApi
4
-
5
- Vercel AddCacheTag API.
6
-
7
- ## Table of contents
8
-
9
- ### Properties
10
-
11
- - [addCacheTag](index.AddCacheTagApi.md#addcachetag)
12
-
13
- ## Properties
14
-
15
- ### addCacheTag
16
-
17
- • **addCacheTag**: (`tag`: `string` \| `string`[]) => [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
18
-
19
- #### Type declaration
20
-
21
- ▸ (`tag`): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
22
-
23
- Add one or more tags to the cache content
24
-
25
- ##### Parameters
26
-
27
- | Name | Type | Description |
28
- | :---- | :--------------------- | :-------------------------------------------- |
29
- | `tag` | `string` \| `string`[] | One or more tags to add to the cache content. |
30
-
31
- ##### Returns
32
-
33
- [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)<`void`\>
34
-
35
- A promise that resolves when the tag is added.
36
-
37
- #### Defined in
38
-
39
- [packages/functions/src/addcachetag/types.ts:11](https://github.com/vercel/vercel/blob/main/packages/functions/src/addcachetag/types.ts#L11)