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

chore(deps): update optionaldependency vuex to v4 #728

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 30, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
vuex ^3.6.2 -> ^4.1.0 age adoption passing confidence

Release Notes

vuejs/vuex (vuex)

v4.1.0

Compare Source

Vue Core Version Requirement Change

This release contains an important fix (#​1883) that relies on the effectScope API from Vue core, which is only available in Vue 3.2+.

Bug Fixes

4.0.2 (2021-06-17)

Bug Fixes
  • devtools: fix no getters displayed on root module + better getters inspector (#​1986) (bc20295)
  • build: cjs build failing due to __VUE_PROD_DEVTOOLS__ defined (#​1991) (#​1992) (7151622)

4.0.1 (2021-05-24)

Features
  • dx: add devtools integration (#​1949)

v4.0.2

Compare Source

Bug Fixes
  • devtools: fix no getters displayed on root module + better getters inspector (#​1986) (bc20295)
  • build: cjs build failing due to __VUE_PROD_DEVTOOLS__ defined (#​1991) (#​1992) (7151622)

v4.0.1

Compare Source

Features
  • dx: add devtools integration (#​1949)

v4.0.0

Compare Source

This is the official Vuex 4 release.

The focus for Vuex 4 is compatibility. Vuex 4 supports Vue 3, and it provides the exact same API as Vuex 3, so users can reuse their existing Vuex code with Vue 3.

There are a few breaking changes described in a later section, so please check them out.

You can find basic usage with both Option and Composition API in the example directory.

It's still released under next tag in NPM package as same as Vue 3. We're planning to remove next tag once Vue 3 is ready to remove it.

There have been a lot of contribution to make Vuex 4 stable. Thank you all for your very much appreciated help. It wouldn't have been possible without this wonderful Vue community!

Documentation

To check out docs, visit next.vuex.vuejs.org.

Breaking changes

Installation process has changed

To align with the new Vue 3 initialization process, the installation process of Vuex has changed.

To create a new store instance, users are now encouraged to use the newly introduced createStore function.

import { createStore } from 'vuex'

export const store = createStore({
  state() {
    return {
      count: 1
    }
  }
})

Whilst this is not technically a breaking change, you may still use the new Store(...) syntax, we recommend this approach to align with Vue 3 and Vue Router Next.

To install Vuex to a Vue instance, pass the store instance instead of Vuex.

import { createApp } from 'vue'
import { store } from './store'
import App from './App.vue'

const app = createApp(App)

app.use(store)

app.mount('#app')
Bundles are now aligned with Vue 3

The following bundles are generated to align with Vue 3 bundles:

  • vuex.global(.prod).js
    • For direct use with <script src="..."> in the browser. Exposes the Vuex global.
    • Global build is built as IIFE, and not UMD, and is only meant for direct use with <script src="...">.
    • Contains hard-coded prod/dev branches and the prod build is pre-minified. Use the .prod.js files for production.
  • vuex.esm-browser(.prod).js
    • For use with native ES module imports (including module supporting browsers via <script type="module">.
  • vuex.esm-bundler.js
    • For use with bundlers such as webpack, rollup and parcel.
    • Leaves prod/dev branches with process.env.NODE_ENV guards (must be replaced by bundler).
    • Does not ship minified builds (to be done together with the rest of the code after bundling).
  • vuex.cjs.js
    • For use in Node.js server-side rendering with require().
Typings for ComponentCustomProperties

Vuex 4 removes its global typings for this.$store within Vue Component to solve issue #​994. When used with TypeScript, you must declare your own module augmentation.

Place the following code in your project to allow this.$store to be typed correctly:

// vuex-shim.d.ts

import { ComponentCustomProperties } from 'vue'
import { Store } from 'vuex'

declare module '@&#8203;vue/runtime-core' {
  // Declare your own store states.
  interface State {
    count: number
  }

  interface ComponentCustomProperties {
    $store: Store<State>
  }
}
createLogger function is exported from the core module

In Vuex 3, createLogger function was exported from vuex/dist/logger but it's now included in the core package. You should import the function directly from vuex package.

import { createLogger } from 'vuex'
Bug Fixes Included Since 4.0.0-rc.2

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Aug 30, 2024
Copy link
Contributor Author

renovate bot commented Aug 30, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: yarn.lock
/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21609
    throw new Error(
          ^

Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
    at fetch (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21609:11)
    at async fetchAsJson (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21623:20)
    ... 4 lines matching cause stack trace ...
    at async Object.runMain (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:23096:5) {
  [cause]: TypeError: globalThis.fetch is not a function
      at fetch (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21603:33)
      at async fetchAsJson (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21623:20)
      at async fetchLatestStableVersion (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21550:20)
      at async fetchLatestStableVersion2 (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:21672:14)
      at async Engine.getDefaultVersion (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22292:23)
      at async Engine.executePackageManagerRequest (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:22390:47)
      at async Object.runMain (/opt/containerbase/tools/corepack/0.29.3/16.20.2/node_modules/corepack/dist/lib/corepack.cjs:23096:5)
}

Copy link

changeset-bot bot commented Aug 30, 2024

⚠️ No Changeset found

Latest commit: ee3da50

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

coderabbitai bot commented Aug 30, 2024

Walkthrough

The changes involve updating the vuex dependency from version ^3.6.2 to ^4.1.0 across multiple package package.json files. This update signifies a transition to a newer major version of vuex, which may include new features, improvements, or breaking changes that could impact the codebase's compatibility and functionality.

Changes

File(s) Change Summary
packages/blocks/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/breadcrumb/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/druxt/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/menu/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/router/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/schema/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/site/package.json Updated vuex from ^3.6.2 to ^4.1.0
packages/views/package.json Updated vuex from ^3.6.2 to ^4.1.0

Sequence Diagram(s)

sequenceDiagram
    participant A as Application
    participant B as Vuex 3.6.2
    participant C as Vuex 4.1.0

    A->>B: Initialize with Vuex 3.6.2
    B-->>A: Provide state management

    A->>C: Upgrade to Vuex 4.1.0
    C-->>A: Provide enhanced state management
Loading

Poem

🐰 In a patch of code, I found a delight,
With Vuex upgraded, oh what a sight!
From three to four, we leap and we bound,
New features await, with joy all around!
Hoppin’ through changes, so fresh and so bright,
Let’s celebrate progress, with hops of pure light! 🌟


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 2600447 and ee3da50.

Files selected for processing (8)
  • packages/blocks/package.json (1 hunks)
  • packages/breadcrumb/package.json (1 hunks)
  • packages/druxt/package.json (1 hunks)
  • packages/menu/package.json (1 hunks)
  • packages/router/package.json (1 hunks)
  • packages/schema/package.json (1 hunks)
  • packages/site/package.json (1 hunks)
  • packages/views/package.json (1 hunks)
Additional comments not posted (8)
packages/schema/package.json (1)

48-48: LGTM! But verify compatibility with the new version of vuex.

The update to vuex version ^4.1.0 is necessary to keep dependencies current. However, this major version upgrade may introduce breaking changes that could affect the functionality of the application. Ensure that the application is compatible with the new version of vuex.

packages/breadcrumb/package.json (1)

51-51: LGTM! But verify compatibility with the new version of vuex.

The update to vuex version ^4.1.0 is necessary to keep dependencies current. However, this major version upgrade may introduce breaking changes that could affect the functionality of the application. Ensure that the application is compatible with the new version of vuex.

packages/blocks/package.json (1)

53-53: LGTM! But verify compatibility with the new version of vuex.

The update to vuex version ^4.1.0 is necessary to keep dependencies current. However, this major version upgrade may introduce breaking changes that could affect the functionality of the application. Ensure that the application is compatible with the new version of vuex.

packages/menu/package.json (1)

52-52: LGTM! But verify compatibility with the existing codebase.

The vuex dependency has been updated from ^3.6.2 to ^4.1.0. Ensure that the codebase is compatible with the new version, as it introduces breaking changes and new features.

The code changes are approved.

Run the following script to verify the compatibility of the updated dependency:

packages/router/package.json (1)

56-56: LGTM! But verify compatibility with the existing codebase.

The vuex dependency has been updated from ^3.6.2 to ^4.1.0. Ensure that the codebase is compatible with the new version, as it introduces breaking changes and new features.

The code changes are approved.

Run the following script to verify the compatibility of the updated dependency:

packages/views/package.json (1)

55-55: LGTM! But verify compatibility with the existing codebase.

The vuex dependency has been updated from ^3.6.2 to ^4.1.0. Ensure that the codebase is compatible with the new version, as it introduces breaking changes and new features.

The code changes are approved.

Run the following script to verify the compatibility of the updated dependency:

packages/site/package.json (1)

58-58: LGTM! But verify the dependency usage in the codebase.

The vuex dependency version is updated from ^3.6.2 to ^4.1.0. Ensure that the codebase is compatible with the new version.

The code changes are approved.

Run the following script to verify the dependency usage:

packages/druxt/package.json (1)

65-65: LGTM! But verify the dependency usage in the codebase.

The vuex dependency version is updated from ^3.6.2 to ^4.1.0. Ensure that the codebase is compatible with the new version.

The code changes are approved.

Run the following script to verify the dependency usage:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants