@embeddable.com/sdk-core 3.2.0 → 3.2.1

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": "@embeddable.com/sdk-core",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "Core Embeddable SDK module responsible for web-components bundling and publishing.",
5
5
  "keywords": [
6
6
  "embeddable",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@embeddable.com/sdk-utils": "*",
39
39
  "@inquirer/select": "^1.3.0",
40
- "@stencil/core": "^4.6.0",
40
+ "@stencil/core": "^4.18.2",
41
41
  "@swc-node/register": "^1.9.0",
42
42
  "archiver": "^5.3.1",
43
43
  "axios": "^1.7.2",
package/src/buildTypes.ts CHANGED
@@ -57,11 +57,13 @@ async function build(ctx: any) {
57
57
  formats: ["es"],
58
58
  fileName: "embeddable-types",
59
59
  },
60
- rollupOptions: {
61
- output: {
62
- entryFileNames: "embeddable-types-[hash].js",
63
- },
64
- },
60
+ rollupOptions: ctx.dev?.watch
61
+ ? undefined
62
+ : {
63
+ output: {
64
+ entryFileNames: "embeddable-types-[hash].js",
65
+ },
66
+ },
65
67
  outDir: ctx.client.buildDir,
66
68
  },
67
69
  });
package/src/generate.ts CHANGED
@@ -93,14 +93,19 @@ async function runStencil(ctx: any) {
93
93
  ctx.client.stencilBuild,
94
94
  "embeddable-wrapper.esm.js",
95
95
  );
96
- const entryFileContent = await fs.readFile(entryFilePath, "utf8");
97
96
 
98
- const fileHash = getContentHash(entryFileContent);
97
+ let fileName = "embeddable-wrapper.esm.js";
98
+ if (!ctx.dev?.watch) {
99
+ const entryFileContent = await fs.readFile(entryFilePath, "utf8");
100
+
101
+ const fileHash = getContentHash(entryFileContent);
102
+
103
+ fileName = `embeddable-wrapper.esm-${fileHash}.js`;
104
+ }
99
105
 
100
- const newFileName = `embeddable-wrapper.esm-${fileHash}.js`;
101
106
  await fs.rename(
102
107
  entryFilePath,
103
- path.resolve(ctx.client.stencilBuild, newFileName),
108
+ path.resolve(ctx.client.stencilBuild, fileName),
104
109
  );
105
110
 
106
111
  await compiler.destroy();