Skip to content

Commit 1c9cd5a

Browse files
committed
chore: update breaking change status as of 4.0.0-beta.1
1 parent e72d961 commit 1c9cd5a

File tree

2 files changed

+60
-10
lines changed

2 files changed

+60
-10
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
11
# [4.0.0-beta.1](https://github.com/vuejs/vuex/compare/v3.3.0...v4.0.0-beta.1) (2020-04-25)
22

3+
### Features
4+
5+
- Added TypeScript support.
6+
7+
### Breaking Changes
8+
9+
#### Bundles are now aligned with Vue 3
10+
11+
The bundles are generated as below to align with Vue 3 bundles.
12+
13+
- `vuex.global(.prod).js`
14+
- For direct use via `<script src="...">` in the browser. Exposes the Vuex global.
15+
- Note that global builds are not UMD builds. They are built as IIFEs and is only meant for direct use via `<script src="...">`.
16+
- Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `.prod.js` files for production.
17+
- `vuex.esm-browser(.prod).js`
18+
- For usage via native ES modules imports (in browser via `<script type="module">`.
19+
- `vuex.esm-bundler.js`
20+
- For use with bundlers like `webpack`, `rollup` and `parcel`.
21+
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler).
22+
- Does not ship minified builds (to be done together with the rest of the code after bundling).
23+
- `vuex.cjs.js`
24+
- For use in Node.js server-side rendering via `require()`.
25+
26+
#### Typings for `ComponentCustomProperties`
327

28+
Vuex 4 removes its global typings for `this.$store` within Vue Component due to solving [issue #994](https://github.com/vuejs/vuex/issues/994). When using TypeScript, you must provide your own augment declaration.
29+
30+
Please place the following code in your project to have `this.$store` working.
31+
32+
```ts
33+
// vuex-shim.d.ts
34+
35+
declare module "@vue/runtime-core" {
36+
// Declare your own store states.
37+
interface State {
38+
count: number
39+
}
40+
41+
interface ComponentCustomProperties {
42+
$store: Store<State>;
43+
}
44+
}
45+
```
446

547
# [4.0.0-alpha.1](https://github.com/vuejs/vuex/compare/v3.1.3...v4.0.0-alpha.1) (2020-03-15)
648

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,23 @@ app.use(store)
4444
app.mount('#app')
4545
```
4646

47+
### Bundles are now aligned with Vue 3
48+
49+
The bundles are generated as below to align with Vue 3 bundles.
50+
51+
- `vuex.global(.prod).js`
52+
- For direct use via `<script src="...">` in the browser. Exposes the Vuex global.
53+
- Note that global builds are not UMD builds. They are built as IIFEs and is only meant for direct use via `<script src="...">`.
54+
- Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `.prod.js` files for production.
55+
- `vuex.esm-browser(.prod).js`
56+
- For usage via native ES modules imports (in browser via `<script type="module">`.
57+
- `vuex.esm-bundler.js`
58+
- For use with bundlers like `webpack`, `rollup` and `parcel`.
59+
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler).
60+
- Does not ship minified builds (to be done together with the rest of the code after bundling).
61+
- `vuex.cjs.js`
62+
- For use in Node.js server-side rendering via `require()`.
63+
4764
### Typings for `ComponentCustomProperties`
4865

4966
Vuex 4 removes its global typings for `this.$store` within Vue Component due to solving [issue #994](https://github.com/vuejs/vuex/issues/994). When using TypeScript, you must provide your own augment declaration.
@@ -65,15 +82,6 @@ declare module "@vue/runtime-core" {
6582
}
6683
```
6784

68-
## Known issues
69-
70-
- The code is kept as close to Vuex 3 code base as possible, and there're plenty of places where we should refactor. However, we are waiting for all of the test cases to pass before doing so (some tests require Vue 3 update).
71-
- TypeScript support is not ready yet. Please use JS environment to test this for now.
72-
73-
## TODOs as of 4.0.0-alpha.1
85+
## TODOs as of 4.0.0-beta.1
7486

75-
- ~Add TypeScript support~
76-
- ~Make all unit test working~
77-
- ~Refactor the codebase~
78-
- ~Update the build system to align with Vue 3~
7987
- Update docs

0 commit comments

Comments
 (0)