@bigbinary/neeto-commons-frontend 4.13.116 → 4.13.118

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.
@@ -1,3 +1,4 @@
1
+ /* eslint-disable security/detect-non-literal-fs-filename */
1
2
  import fs from "fs";
2
3
  import { createRequire } from "module";
3
4
  import path from "path";
@@ -23,15 +24,32 @@ const getAppArg = () => {
23
24
  return null;
24
25
  };
25
26
 
26
- const emitReadyFile = destination => ({
27
+ const invalidateYarnCache = destination => {
28
+ const nodeModulesDir = path.resolve(destination, "../..");
29
+
30
+ // Yarn 1.x uses .yarn-integrity
31
+ const integrityPath = path.join(nodeModulesDir, ".yarn-integrity");
32
+ if (fs.existsSync(integrityPath)) fs.unlinkSync(integrityPath);
33
+
34
+ // Yarn 4.x (with nodeLinker: node-modules) uses .yarn-state.yml
35
+ const statePath = path.join(nodeModulesDir, ".yarn-state.yml");
36
+ if (fs.existsSync(statePath)) fs.unlinkSync(statePath);
37
+ };
38
+
39
+ const emitReadyFile = (
40
+ destination,
41
+ { shouldInvalidateYarnCache = false } = {}
42
+ ) => ({
27
43
  name: "emit-ready-file",
28
44
  writeBundle: () => {
29
45
  const markerPath = path.join(destination, ".ready");
30
- // eslint-disable-next-line security/detect-non-literal-fs-filename
46
+
31
47
  require("fs").writeFileSync(
32
48
  markerPath,
33
49
  `Built at ${new Date().toISOString()}`
34
50
  );
51
+
52
+ if (shouldInvalidateYarnCache) invalidateYarnCache(destination);
35
53
  },
36
54
  });
37
55
 
@@ -109,7 +127,7 @@ const getWatchConfig = ({
109
127
  const watchPlugins = [
110
128
  watchPaths(customWatchPaths),
111
129
  copyFiles(appPath, customCopyPaths),
112
- emitReadyFile(appPath),
130
+ emitReadyFile(appPath, { shouldInvalidateYarnCache: true }),
113
131
  ];
114
132
 
115
133
  return { watchPlugins, appPath };
package/dist/.ready CHANGED
@@ -1 +1 @@
1
- Built at 2026-03-27T11:08:56.951Z
1
+ Built at 2026-04-01T14:35:08.671Z
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "4.13.116",
3
+ "version": "4.13.118",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",