Skip to content

Commit

Permalink
Merge pull request #395 from studiometa/feature/remove-vue-dependency
Browse files Browse the repository at this point in the history
[Feature] Remove the Vue.js dependency
  • Loading branch information
titouanmathis authored Dec 1, 2023
2 parents 5e4bc16 + 69a8075 commit 3ec5106
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 364 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. The format

### Removed

- ⚠️ Remove the `withVue2` decorator ([#395](https://github.com/studiometa/js-toolkit/pull/395))
- ⚠️ Remove the `vue` dependency ([#395](https://github.com/studiometa/js-toolkit/pull/395))
- ⚠️ Remove CJS files from the package ([#394](https://github.com/studiometa/js-toolkit/pull/394))

## [v2.12.0](https://github.com/studiometa/js-toolkit/compare/2.11.2..2.12.0) (2023-12-01)
Expand Down
19 changes: 1 addition & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ function getGuideSidebar() {
text: 'v1 → v2',
link: '/guide/migration/v1-to-v2.html',
},
{
text: 'v2 → v3',
link: '/guide/migration/v2-to-v3.html',
},
],
},
];
Expand Down Expand Up @@ -222,7 +226,6 @@ function getDecoratorsSidebar() {
{ text: 'withRelativePointer', link: '/api/decorators/withRelativePointer.html' },
{ text: 'withResponsiveOptions', link: '/api/decorators/withResponsiveOptions.html' },
{ text: 'withScrolledInView', link: '/api/decorators/withScrolledInView.html' },
{ text: 'withVue2', link: '/api/decorators/withVue2.html' },
];
}

Expand Down
1 change: 0 additions & 1 deletion packages/docs/api/decorators/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ Decorators are used to add extra functionalities to a Base class. The following
- [withMountWhenInView](./withMountWhenInView.html)
- [withMountOnMediaQuery](./withMountOnMediaQuery.html)
- [withMountWhenPrefersMotion](./withMountWhenPrefersMotion.html)
- [withVue2](./withVue2.html)
110 changes: 0 additions & 110 deletions packages/docs/api/decorators/withVue2.md

This file was deleted.

22 changes: 22 additions & 0 deletions packages/docs/guide/migration/v2-to-v3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Migrating from v2 to v3

Make sure to read through the following steps to ensure a smooth upgrade from v2 to v3 of this package.

[[toc]]

## The package is ESM only

Introduced in [#394](https://github.com/studiometa/js-toolkit/pull/394), the package is now ESM only and does not include CJS files anymore.

This should have no impact on most projects as files are handled by bundlers most of the time.

## The `withVue2` decorator is removed

The `withVue2` decorator is removed, along with the package's dependency to the `vue@2` package.

If your project is using this decorator, you can copy the [latest version](https://github.com/studiometa/js-toolkit/blob/support/2.x/packages/js-toolkit/decorators/withVue2.ts) from the package in your project and keep using it.

See pull-request [#395](https://github.com/studiometa/js-toolkit/pull/395) for more details.



1 change: 0 additions & 1 deletion packages/js-toolkit/decorators/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ export * from './withMountWhenPrefersMotion.js';
export * from './withRelativePointer.js';
export * from './withResponsiveOptions.js';
export * from './withScrolledInView/index.js';
export * from './withVue2.js';
83 changes: 0 additions & 83 deletions packages/js-toolkit/decorators/withVue2.ts

This file was deleted.

6 changes: 0 additions & 6 deletions packages/js-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,5 @@
"dependencies": {
"@motionone/easing": "^10.15.1",
"deepmerge": "^4.3.1"
},
"devDependencies": {
"vue": "^2.6.0"
},
"peerDependencies": {
"vue": "^2.6.0 || ^3.0"
}
}
1 change: 0 additions & 1 deletion packages/tests/__snapshots__/index.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@ exports[`The package exports should export helpers and the Base class 1`] = `
"withRelativePointer",
"withResponsiveOptions",
"withScrolledInView",
"withVue2",
]
`;
27 changes: 0 additions & 27 deletions packages/tests/decorators/__snapshots__/withVue2.spec.js.snap

This file was deleted.

Loading

0 comments on commit 3ec5106

Please sign in to comment.