@salesforcedevs/dx-components 1.27.9 → 1.27.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.27.9",
3
+ "version": "1.27.12",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -44,9 +44,5 @@
44
44
  "luxon": "3.4.4",
45
45
  "msw": "^2.12.4"
46
46
  },
47
- "volta": {
48
- "node": "20.19.0",
49
- "yarn": "1.22.19"
50
- },
51
- "gitHead": "3e4a0e16d2fa6ea35d602a4fb71df598a3303715"
47
+ "gitHead": "2a64d588c773dba9a5d382e3cf008b9935c03fb9"
52
48
  }
@@ -111,16 +111,20 @@ async function initializeShiki(): Promise<HighlighterCore> {
111
111
  return shikiInstance.initPromise;
112
112
  }
113
113
 
114
- const shiki = await getShiki();
115
- shikiInstance.initPromise = shiki.createHighlighter({
116
- themes: ["light-plus", "material-theme-darker"],
117
- langs: CORE_LANGUAGES
118
- });
114
+ // Assign promise IMMEDIATELY before any async work to prevent race conditions
115
+ shikiInstance.initPromise = (async () => {
116
+ const shiki = await getShiki();
117
+ const highlighter = await shiki.createHighlighter({
118
+ themes: ["light-plus", "material-theme-darker"],
119
+ langs: CORE_LANGUAGES
120
+ });
121
+ shikiInstance.highlighter = highlighter;
122
+ shikiInstance.initialized = true;
123
+ return highlighter;
124
+ })();
119
125
 
120
126
  try {
121
- shikiInstance.highlighter = await shikiInstance.initPromise;
122
- shikiInstance.initialized = true;
123
- return shikiInstance.highlighter;
127
+ return await shikiInstance.initPromise;
124
128
  } catch (error) {
125
129
  console.error("Failed to initialize Shiki:", error);
126
130
  shikiInstance.initPromise = null;