Skip to content

Commit 8dba09e

Browse files
authored
fix: #151 support Windows (#152)
* fix: #151 support Windows * docs(changeset): support Windows * RELEASING: Releasing 2 package(s) Releases: [email protected] [email protected] [skip ci] --------- Co-authored-by: liuyi <[email protected]>
1 parent ceede1d commit 8dba09e

File tree

6 files changed

+78
-6
lines changed

6 files changed

+78
-6
lines changed

packages/auto-polyfills-webpack-plugin/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# auto-polyfills-webpack-plugin
22

3+
## 1.1.1
4+
5+
### Patch Changes
6+
7+
- 4e63e269: support Windows
8+
39
## 1.1.0
410

511
### Minor Changes

packages/auto-polyfills-webpack-plugin/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,12 @@ class AutoPolyfillsWebpackPlugin {
148148

149149
get coreJsVersion() {
150150
try {
151-
const coreJsPathList = require.resolve('core-js').split('/');
151+
const coreJsPath = require.resolve('core-js');
152+
// Windows’s path separator is \\, MacOS and Linux is /
153+
const splitKey = coreJsPath.includes('/') ? '/' : '\\';
154+
const coreJsPathList = coreJsPath.split(splitKey);
152155
coreJsPathList.pop();
153-
const coreJsPkg = join(coreJsPathList.join('/'), './package.json');
156+
const coreJsPkg = join(coreJsPathList.join(splitKey), './package.json');
154157
return require(coreJsPkg).version;
155158
} catch (ex) {
156159
throw ex;

packages/auto-polyfills-webpack-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "auto-polyfills-webpack-plugin",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "a webpack plugin for auto generate polyfills",
55
"main": "lib/index.js",
66
"typings": "lib/index.d.ts",

packages/ko/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# ko
22

3+
## 6.5.4
4+
5+
### Patch Changes
6+
7+
- 4e63e269: support Windows
8+
- Updated dependencies [4e63e269]
9+
10+
311
## 6.5.3
412

513
### Patch Changes

packages/ko/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ko",
3-
"version": "6.5.3",
3+
"version": "6.5.4",
44
"description": "build & lint library",
55
"keywords": [
66
"ko",
@@ -45,7 +45,7 @@
4545
"@nuxt/friendly-errors-webpack-plugin": "^2.5.2",
4646
"@parcel/css": "^1.12.2",
4747
"@pmmmwh/react-refresh-webpack-plugin": "^0.5.7",
48-
"auto-polyfills-webpack-plugin": "workspace:^1.1.0",
48+
"auto-polyfills-webpack-plugin": "workspace:1.1.1",
4949
"autoprefixer": "^10.4.7",
5050
"babel-loader": "^8.2.5",
5151
"babel-plugin-treasure": "^0.9.0",

pnpm-lock.yaml

Lines changed: 56 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)