Skip to content

Commit ec25c7d

Browse files
authoredJul 22, 2019
chore(windows): make install portable to windows (#4779)
* chore(install) - make preinstall hook windows portable - make link-packages script use junction symlinks for windows * use npx * run preinstll in appveyor * remove win32 check, pin dep (and update .npmrc)
1 parent dd81ca5 commit ec25c7d

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed
 

‎.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
loglevel=warn
22
progress=false
33
package-lock=false
4+
save-exact=true

‎appveyor.yml

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ install:
6464
# clean cache to prevent install permission issues
6565
- npm cache clean --force
6666
# install root modules only, and retry automatically if install fails
67+
- npm run preinstall
6768
- npm install --ignore-scripts || npm install --ignore-scripts || npm install --ignore-scripts
6869
- .\node_modules\.bin\print-arch
6970
# because we skipped scripts, we need to do

‎package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"dev-debug": "node ./scripts/debug.js dev",
3232
"docker": "./scripts/run-docker-local.sh",
3333
"effective:circle:config": "circleci config process circle.yml | sed /^#/d",
34-
"preinstall": "rm -rf node_modules/@packages || true",
34+
"preinstall": "npx shx rm -rf node_modules/@packages",
3535
"postinstall": "echo 'root postinstall' && npm run link && npm run all install && npm run build",
3636
"install-filtered": "npm run all install -- --package $(node ./scripts/check-deps.js --list)",
3737
"jscodeshift": "jscodeshift -t ./node_modules/js-codemod/transforms/arrow-function-arguments.js",
@@ -151,6 +151,7 @@
151151
"proxyquire": "2.1.0",
152152
"ramda": "0.24.1",
153153
"shelljs": "0.8.3",
154+
"shx": "0.3.2",
154155
"sinon": "7.3.2",
155156
"snap-shot-it": "7.8.0",
156157
"stop-only": "3.0.1",

‎scripts/link-packages.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,11 @@ function makeLinks () {
3232
const basename = path.basename(dirname)
3333

3434
const destinationLink = path.join(pathToPackages, basename)
35-
// const registerPath = path.join(destinationFolder, 'register.js')
36-
// const fullMain = path.resolve(dirname, json.main)
37-
38-
// debug('full name', fullMain)
39-
// const relativePathToMain = path.relative(destinationFolder, fullMain)
40-
41-
// debug('relative path to main', relativePathToMain)
4235
const relativePathToDest = path.relative(path.dirname(destinationLink), dirname)
4336

4437
console.log(destinationLink, '->', relativePathToDest)
4538

46-
return fs.symlink(relativePathToDest, destinationLink)
39+
return fs.symlink(relativePathToDest, destinationLink, 'junction')
4740
})
4841
})
4942
}

4 commit comments

Comments
 (4)

cypress-bot[bot] commented on Jul 22, 2019

@cypress-bot[bot]
Contributor

Circle has built the linux x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/linux-x64/circle-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-137056/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.4.1/circle-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-137041/cypress.tgz

cypress-bot[bot] commented on Jul 22, 2019

@cypress-bot[bot]
Contributor

AppVeyor has built the win32 ia32 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/win32-ia32/appveyor-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-26156898/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.4.1/win32-ia32/appveyor-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-26156898/cypress.zip

cypress-bot[bot] commented on Jul 22, 2019

@cypress-bot[bot]
Contributor

AppVeyor has built the win32 x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

set CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/win32-x64/appveyor-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-26156898/cypress.zip
npm install https://cdn.cypress.io/beta/binary/3.4.1/win32-x64/appveyor-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-26156898/cypress.zip

cypress-bot[bot] commented on Jul 22, 2019

@cypress-bot[bot]
Contributor

Circle has built the darwin x64 version of the Test Runner.

You can install this pre-release platform-specific build using instructions at https://on.cypress.io/installing-cypress#Install-pre-release-version.

You will need to use custom CYPRESS_INSTALL_BINARY url and install Cypress using an url instead of the version.

export CYPRESS_INSTALL_BINARY=https://cdn.cypress.io/beta/binary/3.4.1/darwin-x64/circle-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-137060/cypress.zip
npm install https://cdn.cypress.io/beta/npm/3.4.1/circle-develop-ec25c7dff893dca748d26e052cf2407d9475ac5e-137058/cypress.tgz
Please sign in to comment.