Skip to content

Commit

Permalink
Fix forms postinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
f-elix committed May 14, 2024
1 parent 206486d commit 42c2866
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
7 changes: 7 additions & 0 deletions packages/components/pagination/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @288-toolkit/pagination

## 3.1.3

### Patch Changes

- Updated dependencies
- @288-toolkit/forms@4.2.1

## 3.1.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/pagination/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@288-toolkit/pagination",
"version": "3.1.2",
"version": "3.1.3",
"author": "DeuxHuitHuit",
"license": "MIT",
"type": "module",
Expand Down
6 changes: 6 additions & 0 deletions packages/forms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @288-toolkit/forms

## 4.2.1

### Patch Changes

- Fix postinstall script

## 4.2.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@288-toolkit/forms",
"version": "4.2.0",
"version": "4.2.1",
"author": "DeuxHuitHuit",
"license": "MIT",
"type": "module",
Expand Down
13 changes: 1 addition & 12 deletions packages/forms/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,7 @@ if (process.env.CI) {
process.exit(0);
}

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const gitConfig = await fs.readFile(path.join(__dirname, '../../.git/config'), {
encoding: 'utf-8'
});

const inToolkit = !!gitConfig?.match(
new RegExp('\\[remote "origin"\\]\\s+url = .+288-toolkit\\.git')
)?.[0];

// Skip this script if we are in the toolkit
if (inToolkit) {
if (!process.cwd().includes('node_modules')) {
process.exit(0);
}

Expand Down

0 comments on commit 42c2866

Please sign in to comment.