Comments (8)
🎉 This issue has been resolved in version 1.3.1 🎉
The release is available on:
npm package (@latest dist-tag)
- GitHub release
Your semantic-release bot 📦🚀
from kcd-scripts.
nice one @kentcdodds !
from kcd-scripts.
Ok I'm not sure I understand what the problem is. The executable for Windows is the *.cmd
file, which is a thin wrapper around invoking node.exe with pkg.bin
.
For example, the contents of node_modules\.bin\webpack.cmd
is:
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\webpack\bin\webpack.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\webpack\bin\webpack.js" %*
)
and likewise, the contents of which.cmd
is:
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\..\which\bin\which" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\..\which\bin\which" %*
)
As you can see, they follow the same general format, the only thing differing is the path to the *.js
file that node will execute.
This is required because in Windows, executable files are determined by file extension rather than a permissions bit as they are in *nix land.
The *.cmd
file can be treated as the executable, and can be started via child_process.exec
or child_process.spawn
and it should just do the right thing.
from kcd-scripts.
Ok, I see what the issue is (I cloned the repo and ran the test suite). You might have to rethink the tests here, since the way Windows handles command lines / dir separators / executables is so different from *nix. Gotta run to the store, but I might take a crack at it later tonight.
from kcd-scripts.
Thanks for looking into it! If you have another suggestion let me know! I'm thinking that with the serializers I add we can normalize the paths so it's not an issue for tests, but I definitely want it to work the same as far as the implementation goes. I'd really love it to not have the full path to the executable if the executable exists in the PATH by its name already.
from kcd-scripts.
I might be missing something, but why not use npx
to run the scripts instead? From what I've seen that should remove the need for the resolveBin
util altogether.
from kcd-scripts.
Hmmm... Interesting thought. That might work! Would you like to give it a try?
from kcd-scripts.
Sure, I'll give it a go!
from kcd-scripts.
Related Issues (20)
- TypeScript support HOT 7
- Cannot find module '@babel/compat-data/corejs3-shipped-proposals' HOT 1
- 6.1.0 seems to have a regression HOT 1
- High-level visibility of configurations HOT 2
- The automated release is failing 🚨
- The automated release is failing 🚨
- ReactDOM is misspelled as ReactDom in UMD files HOT 1
- Babel removes test files from src directory after building HOT 1
- Environment key "jest/globals" is unknown HOT 1
- babel-plugin-minify-dead-code-elimination removes function names HOT 2
- [pre-commit]: test step hangs due to --watch HOT 2
- tsconfig conflicts with build HOT 1
- ESLint fails on Node 15 HOT 4
- fix linting issues on windows HOT 2
- Incorrect `latest` version tag in NPM HOT 1
- Validate script fails on window-latest 14
- eslint is looking inside the folders coverage
- istanbul ignore else HOT 4
- bug: ESLint cannot be imported in Jest 27 HOT 1
- [Feature Request] Pin `browserslist` and `caniuse-lite` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kcd-scripts.