@lage-run/cache 1.3.0 → 1.3.2

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.json CHANGED
@@ -2,7 +2,43 @@
2
2
  "name": "@lage-run/cache",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 18 Jun 2024 00:31:16 GMT",
5
+ "date": "Wed, 11 Sep 2024 20:30:17 GMT",
6
+ "version": "1.3.2",
7
+ "tag": "@lage-run/cache_v1.3.2",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "kchau@microsoft.com",
12
+ "package": "@lage-run/cache",
13
+ "commit": "3fb589f859c1215e2f3b93bbdb55fae1d5fef116",
14
+ "comment": "yarn 4"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@lage-run/cache",
19
+ "comment": "Bump @lage-run/logger to v1.3.1",
20
+ "commit": "not available"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Tue, 25 Jun 2024 18:25:19 GMT",
27
+ "version": "1.3.1",
28
+ "tag": "@lage-run/cache_v1.3.1",
29
+ "comments": {
30
+ "patch": [
31
+ {
32
+ "author": "brunoru@microsoft.com_msteamsmdb",
33
+ "package": "@lage-run/cache",
34
+ "commit": "09e1689b8716b87202634a2866d712a1e0b9783f",
35
+ "comment": "Revert \"DefaultAzureCredential as fallback with optional in config set credential (#760)\""
36
+ }
37
+ ]
38
+ }
39
+ },
40
+ {
41
+ "date": "Tue, 18 Jun 2024 00:31:29 GMT",
6
42
  "version": "1.3.0",
7
43
  "tag": "@lage-run/cache_v1.3.0",
8
44
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,29 @@
1
1
  # Change Log - @lage-run/cache
2
2
 
3
- This log was last generated on Tue, 18 Jun 2024 00:31:16 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 11 Sep 2024 20:30:17 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.3.2
8
+
9
+ Wed, 11 Sep 2024 20:30:17 GMT
10
+
11
+ ### Patches
12
+
13
+ - yarn 4 (kchau@microsoft.com)
14
+ - Bump @lage-run/logger to v1.3.1
15
+
16
+ ## 1.3.1
17
+
18
+ Tue, 25 Jun 2024 18:25:19 GMT
19
+
20
+ ### Patches
21
+
22
+ - Revert "DefaultAzureCredential as fallback with optional in config set credential (#760)" (brunoru@microsoft.com_msteamsmdb)
23
+
7
24
  ## 1.3.0
8
25
 
9
- Tue, 18 Jun 2024 00:31:16 GMT
26
+ Tue, 18 Jun 2024 00:31:29 GMT
10
27
 
11
28
  ### Minor changes
12
29
 
@@ -80,31 +80,17 @@ function createBackfillLogger() {
80
80
  }
81
81
  function createBackfillCacheConfig(cwd, cacheOptions = {}, backfillLogger) {
82
82
  const envConfig = (0, _backfillconfig.getEnvConfig)(backfillLogger);
83
- // To avoid weakmap issues, we need to store the credential and restore post-merge
84
- const credentialStash = getCredentialStash(cacheOptions);
85
83
  const mergedConfig = {
86
84
  ...(0, _backfillconfig.createDefaultConfig)(cwd),
87
85
  ...cacheOptions,
88
86
  ...envConfig
89
87
  };
90
- applyCredentialStashToMergedConfig(mergedConfig, credentialStash);
91
- return mergedConfig;
92
- }
93
- function getCredentialStash(cacheOptions) {
94
- if (cacheOptions.cacheStorageConfig && cacheOptions.cacheStorageConfig.provider === "azure-blob" && cacheOptions.cacheStorageConfig.options.credential) {
95
- const stashedCredential = cacheOptions.cacheStorageConfig.options.credential;
96
- delete cacheOptions.cacheStorageConfig.options.credential;
97
- return stashedCredential;
98
- }
99
- return null;
100
- }
101
- function applyCredentialStashToMergedConfig(mergedConfig, credentialStash) {
102
88
  if (mergedConfig.cacheStorageConfig.provider === "azure-blob") {
103
- const connectionString = mergedConfig.cacheStorageConfig.options.connectionString;
104
- if (connectionString && !isTokenConnectionString(connectionString)) {
105
- mergedConfig.cacheStorageConfig.options.credential = credentialStash || _CredentialCache.CredentialCache.getInstance();
89
+ if (mergedConfig.cacheStorageConfig.options.connectionString && !isTokenConnectionString(mergedConfig.cacheStorageConfig.options.connectionString)) {
90
+ mergedConfig.cacheStorageConfig.options.credential = _CredentialCache.CredentialCache.getInstance();
106
91
  }
107
92
  }
93
+ return mergedConfig;
108
94
  }
109
95
  function isTokenConnectionString(connectionString) {
110
96
  return connectionString.includes("SharedAccessSignature");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/cache",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Cache for Lage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,8 +18,8 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@azure/identity": "^4.0.1",
21
+ "@lage-run/logger": "^1.3.1",
21
22
  "@lage-run/target-graph": "^0.8.9",
22
- "@lage-run/logger": "^1.3.0",
23
23
  "backfill-cache": "5.8.0",
24
24
  "backfill-config": "6.4.2",
25
25
  "backfill-logger": "5.2.1",