@vercel/functions
Advanced tools
+2
-21
@@ -40,17 +40,2 @@ "use strict"; | ||
| const defaultNamespaceSeparator = "$"; | ||
| function encodeTags(tags) { | ||
| return tags.map(encodeURIComponent); | ||
| } | ||
| function encodeTag(tag) { | ||
| return Array.isArray(tag) ? encodeTags(tag) : encodeURIComponent(tag); | ||
| } | ||
| function encodeOptions(options) { | ||
| if (!options) { | ||
| return void 0; | ||
| } | ||
| if (options.tags && options.tags.length > 0) { | ||
| return { ...options, tags: encodeTags(options.tags) }; | ||
| } | ||
| return options; | ||
| } | ||
| let inMemoryCacheInstance = null; | ||
@@ -90,7 +75,3 @@ let buildCacheInstance = null; | ||
| set: (key, value, options) => { | ||
| const encodedOptions = encodeOptions(options); | ||
| if (encodedOptions) { | ||
| return resolveCache().set(makeKey(key), value, encodedOptions); | ||
| } | ||
| return resolveCache().set(makeKey(key), value); | ||
| return resolveCache().set(makeKey(key), value, options); | ||
| }, | ||
@@ -101,3 +82,3 @@ delete: (key) => { | ||
| expireTag: (tag) => { | ||
| return resolveCache().expireTag(encodeTag(tag)); | ||
| return resolveCache().expireTag(tag); | ||
| } | ||
@@ -104,0 +85,0 @@ }; |
+6
-0
| # @vercel/functions | ||
| ## 3.4.3 | ||
| ### Patch Changes | ||
| - [functions] Revert "[functions] URL encode cache tags" ([#15213](https://github.com/vercel/vercel/pull/15213)) | ||
| ## 3.4.2 | ||
@@ -4,0 +10,0 @@ |
@@ -264,3 +264,3 @@ # Module: index | ||
| [packages/functions/src/cache/index.ts:55](https://github.com/vercel/vercel/blob/main/packages/functions/src/cache/index.ts#L55) | ||
| [packages/functions/src/cache/index.ts:33](https://github.com/vercel/vercel/blob/main/packages/functions/src/cache/index.ts#L33) | ||
@@ -267,0 +267,0 @@ --- |
+1
-1
@@ -33,3 +33,3 @@ { | ||
| }, | ||
| "version": "3.4.2", | ||
| "version": "3.4.3", | ||
| "repository": { | ||
@@ -36,0 +36,0 @@ "directory": "packages/functions", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
152450
-0.26%2005
-0.94%