Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove pre/post install hooks #2771

Merged
merged 3 commits into from Jul 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion .ado/windows-vs-pr.yml
Expand Up @@ -50,6 +50,13 @@ jobs:
submodules: false # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch

- task: CmdLine@2
displayName: Modify package.json to use unforked RN
inputs:
script: node scripts/modifyDevDepToUseUnforkedRN.js
workingDirectory: vnext
condition: and(succeeded(), eq(variables['UseRNFork'], 'false'))

- task: CmdLine@2
displayName: yarn install (Using microsoft/react-native)
inputs:
Expand All @@ -65,7 +72,6 @@ jobs:
inputs:
script: yarn install
workingDirectory: vnext
env: { UseRNFork: 'false' }
condition: and(succeeded(), eq(variables['UseRNFork'], 'false'))

- template: templates/stop-packagers.yml
Expand Down
16 changes: 16 additions & 0 deletions vnext/Scripts/modifyDevDepToUseUnforkedRN.js
@@ -0,0 +1,16 @@
/**
* Part of our CI loop verifies that react-native-windows can build against react-native, as well as the microsoft fork of react-native
* This script modifies package.json to have devDependencies that use standard react-native.
* @tscheck
* @format
*/
const path = require('path');
const fs = require('fs');

const pkgJsonPath = path.resolve(__dirname, '../package.json');
let pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, 'utf8'));

pkgJson.devDependencies['react-native'] = pkgJson.peerDependencies[
'react-native'
].slice(0, pkgJson.peerDependencies['react-native'].indexOf(' '));
fs.writeFileSync(pkgJsonPath, JSON.stringify(pkgJson, null, 2) + '\n');
25 changes: 0 additions & 25 deletions vnext/Scripts/postInstall.js

This file was deleted.

34 changes: 0 additions & 34 deletions vnext/Scripts/preInstall.js

This file was deleted.

6 changes: 1 addition & 5 deletions vnext/package.json
Expand Up @@ -10,8 +10,6 @@
"description": "ReactNative Windows implementation using react-native's c++ ReactCommon bridge",
"types": "index.d.ts",
"scripts": {
"preinstall": "node Scripts/preInstall.js",
"postinstall": "node Scripts/postInstall.js",
"build": "just-scripts build",
"clean": "just-scripts clean",
"start": "node Scripts/cli.js start",
Expand Down Expand Up @@ -51,15 +49,13 @@
"@types/es6-promise": "0.0.32",
"@types/react": "16.8.15",
"@types/react-native": "~0.57.51",
"@typescript-eslint/eslint-plugin": "^1.5.0",
"@typescript-eslint/parser": "^1.5.0",
"clang-format": "1.2.4",
"eslint": "5.1.0",
"eslint-plugin-prettier": "2.6.0",
"just-scripts": "^0.24.2",
"prettier": "1.13.6",
"react": "16.8.3",
"react-native": "0.59.0-microsoft.16",
"react-native": "https://github.com/microsoft/react-native/archive/v0.59.0-microsoft.16.tar.gz",
"typescript": "3.5.1"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions vnext/yarn.lock
Expand Up @@ -5191,9 +5191,9 @@ react-native-local-cli@^1.0.0-alpha.5:
xcode "^1.0.0"
xmldoc "^0.4.0"

"react-native@https://github.com/Microsoft/react-native/archive/v0.59.0-microsoft.16.tar.gz":
"react-native@https://github.com/microsoft/react-native/archive/v0.59.0-microsoft.16.tar.gz":
version "0.59.0-microsoft.16"
resolved "https://github.com/Microsoft/react-native/archive/v0.59.0-microsoft.16.tar.gz#bf47c0c2cd52674aa8d7b5c3d57b679d2ff808a1"
resolved "https://github.com/microsoft/react-native/archive/v0.59.0-microsoft.16.tar.gz#bf47c0c2cd52674aa8d7b5c3d57b679d2ff808a1"
dependencies:
"@babel/core" "^7.4.0"
"@babel/generator" "^7.4.0"
Expand Down