takeat-design-system-ui-kit 0.5.2 → 0.5.4

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": "takeat-design-system-ui-kit",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -16,7 +16,7 @@
16
16
  "build-storybook-docs": "storybook build --docs",
17
17
  "patch": "npm version patch && npm publish",
18
18
  "create-icons": "npx @svgr/cli --icon --typescript --out-dir src/components/icons --template iconTemplate.ts src/assets/icons && node generateIconIndex.js",
19
- "postinstall": "node ./dist/scripts/postinstall.js"
19
+ "postinstall": "node ./scripts/postinstall.js"
20
20
  },
21
21
  "dependencies": {
22
22
  "primereact": "^10.9.3",
@@ -1,9 +1,20 @@
1
1
  // scripts/postinstall.js
2
- const pkg = require("../package.json");
2
+
3
+ import { readFile } from "fs/promises";
4
+ import path from "path";
5
+ import { fileURLToPath } from "url";
6
+
7
+ // Corrigir __dirname e __filename em ESM
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = path.dirname(__filename);
10
+
11
+ // Lê o package.json dinamicamente (opcional)
12
+ const packageJsonPath = path.resolve(__dirname, "../package.json");
13
+ const packageJson = JSON.parse(await readFile(packageJsonPath, "utf-8"));
3
14
 
4
15
  console.log(`
5
- 📦 Obrigado por instalar a versão ${pkg.version} da biblioteca ${pkg.name}!
16
+ 📦 Obrigado por instalar a versão ${packageJson.version} da biblioteca ${packageJson.name}!
6
17
 
7
18
  🆕 Novidades:
8
- - Adicionado o componente CollapsableMenu
19
+ - Adicionado o componente CollapsableMenu
9
20
  `);