Skip to content

Commit

Permalink
Merge pull request #220 from juanky201271/dev
Browse files Browse the repository at this point in the history
Fsevents for macOS fixed
  • Loading branch information
juanky201271 authored Nov 23, 2024
2 parents e799d05 + 59f3a62 commit cdbac9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@
"webpack-manifest-plugin": "2.2.0",
"workbox-webpack-plugin": "5.1.4"
},
"resolutions": {
},
"scripts": {
"postinstall": "node set-resolutions-ios.js",
"postinstall": "node set-resolutions-macos.js",
"lint": "eslint . --fix --ext .js,.jsx,.ts,.tsx",
"start": "concurrently -k \"cross-env NODE_ENV=production BROWSER=none yarn react-start\" \"wait-on http://localhost:3000 && electronmon .\"",
"script:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider node scripts/build.js",
Expand Down Expand Up @@ -302,5 +300,8 @@
"presets": [
"react-app"
]
},
"resolutions": {
"fsevents": "2.3.2"
}
}
}
11 changes: 6 additions & 5 deletions set-resolutions-ios.js → set-resolutions-macos.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const fs = require('fs');
const { execSync } = require('child_process');
const os = require('os');

// Detectar si es macOS
Expand All @@ -8,12 +9,12 @@ if (os.platform() === 'darwin') {
// Agregar la resolución solo si no está configurada
if (!packageJson.resolutions) {
packageJson.resolutions = {};
}

packageJson.resolutions.fsevents = "2.3.2";
packageJson.resolutions.fsevents = "2.3.2";

fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2));
console.log('Resolutions updated only for macOS');
fs.writeFileSync('package.json', JSON.stringify(packageJson, null, 2));
console.log('Resolutions updated only for macOS, re-running yarn again.');
execSync('yarn install', { stdio: 'inherit' });
}
} else {
console.log('Resolutions NOT updated, this is only for macOS.');
}

0 comments on commit cdbac9c

Please sign in to comment.