@ashtuka/react-lib 1.0.10 → 1.0.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": "@ashtuka/react-lib",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "main": "./dist/react-lib.umd.js",
5
5
  "module": "./dist/react-lib.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -12,8 +12,7 @@
12
12
  }
13
13
  },
14
14
  "files": [
15
- "dist",
16
- "scripts"
15
+ "dist"
17
16
  ],
18
17
  "publishConfig": {
19
18
  "access": "public"
@@ -23,8 +22,7 @@
23
22
  "build": "vite build && tsc",
24
23
  "lint": "eslint . --ext .ts,.tsx --fix",
25
24
  "format": "prettier --write .",
26
- "release": "npm version patch && npm publish --access public",
27
- "postinstall": "node scripts/postinstall.js"
25
+ "release": "npm version patch && npm publish --access public"
28
26
  },
29
27
  "peerDependencies": {
30
28
  "react": "^19.1.1",
@@ -1,44 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-require-imports */
2
- console.log("✅ @ashtuka/react-lib: postinstall script executed");
3
- (async () => {
4
- try {
5
- const fs = require('fs');
6
- const path = require('path');
7
- console.log('call - test');
8
-
9
- // Шлях до package.json користувацького проєкту
10
- const projectPkgPath = path.resolve(process.cwd(), 'package.json');
11
- if (!fs.existsSync(projectPkgPath)) {
12
- console.warn('[peer-deps-check] Не знайдено package.json у проєкті');
13
- process.exit(0);
14
- }
15
-
16
- const pkg = JSON.parse(fs.readFileSync(projectPkgPath, 'utf8'));
17
-
18
- // peerDependencies твоєї бібліотеки
19
- const libPkg = require(path.resolve(__dirname, '../package.json'));
20
- const peers = libPkg.peerDependencies || {};
21
-
22
- const missing = Object.keys(peers).filter(
23
- dep => !(
24
- (pkg.dependencies && pkg.dependencies[dep]) ||
25
- (pkg.devDependencies && pkg.devDependencies[dep])
26
- )
27
- );
28
-
29
- if (missing.length > 0) {
30
- console.error(
31
- `\n[peer-deps-check] ❌ Відсутні необхідні залежності:\n - ${missing.join('\n - ')}`
32
- );
33
- console.error('Встанови їх командою:');
34
- console.error(`npm install ${missing.map(dep => `${dep}@${peers[dep]}`).join(' ')}`);
35
- process.exit(1);
36
- } else {
37
- console.log('[peer-deps-check] ✅ Всі необхідні залежності встановлені');
38
- }
39
- } catch (err) {
40
- console.error('[peer-deps-check] Помилка виконання:', err);
41
- process.exit(1);
42
- }
43
- })();
44
-