Skip to content

Commit

Permalink
chore: removed un getCurrentInstance check, added package files field
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasborawski committed Oct 25, 2022
1 parent 925967c commit 8b27c0c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Vue Use State Effect

<a href="https://badge.fury.io/js/vue-use-state-effect"><img src="https://img.shields.io/github/workflow/status/lukasborawski/vue-use-state-effect/CI" alt="npm version" height="18"></a>
<a href="https://badge.fury.io/js/vue-use-state-effect"><img src="https://d25lcipzij17d.cloudfront.net/badge.svg?id=js&r=r&type=6e&v=0.1.2&x2=0" alt="npm version" height="18"></a>
<a href="https://badge.fury.io/js/vue-use-state-effect"><img src="https://d25lcipzij17d.cloudfront.net/badge.svg?id=js&r=r&type=6e&v=0.1.4&x2=0" alt="npm version" height="18"></a>
<a href="https://badge.fury.io/js/vue-use-state-effect"><img src="https://img.shields.io/bundlephobia/min/vue-use-state-effect" alt="npm version" height="18"></a>
<a href="https://badge.fury.io/js/vue-use-state-effect"><img src="https://img.shields.io/npm/dm/vue-use-state-effect" alt="npm version" height="18"></a>
<a href="https://badge.fury.io/js/vue-use-state-effect"><img src="https://img.shields.io/npm/l/vue-use-state-effect" alt="npm version" height="18"></a>

**CAUTION**: Built and tested for/with **Vue 3** and/or **Nuxt 3** (RC-2).
**CAUTION**: Built and tested for/with **Vue 3** and/or **Nuxt 3** (RC-12).

Fast and small library (composable), built on top of the native `EffectScope` **Vue 3 API** that will provide safe and sharable (across the app) state for your local composables and functions. It might be a good replacement / alternative for **Vuex** or **Pinia** state management, if you need smaller and less extensive solution.

Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ package-lock.json
*.logs

BACKLOG.md

vue-use-state-effect
26 changes: 17 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
### 0.1.4 (25.10.2022)

- removed unnecessary lib build
- removed doubled `getCurrentInstanc` check

### 0.1.2 (09.06.2022)
* [**feature**] destroy destination ([#3](https://github.com/lukasborawski/vue-use-state-effect/pull/3))
* Nuxt demo update ([c38644d](https://github.com/lukasborawski/vue-use-state-effect/pull/3/commits/c38644d56babbf3c674f81742c94b74518d7a429))
* docs update

- [**feature**] destroy destination ([#3](https://github.com/lukasborawski/vue-use-state-effect/pull/3))
- Nuxt demo update ([c38644d](https://github.com/lukasborawski/vue-use-state-effect/pull/3/commits/c38644d56babbf3c674f81742c94b74518d7a429))
- docs update

### 0.1.1 (24.05.2022)
* fixed typings ([96fb9ce](https://github.com/lukasborawski/vue-use-state-effect/commit/96fb9ce2bcf29bc8048ca2e99e5f0cd8493b4f43))
* Nuxt demo update ([2a078b8](https://github.com/lukasborawski/vue-use-state-effect/commit/2a078b898c36abbb439f180f1fd853cac704f847))
* docs update

- fixed typings ([96fb9ce](https://github.com/lukasborawski/vue-use-state-effect/commit/96fb9ce2bcf29bc8048ca2e99e5f0cd8493b4f43))
- Nuxt demo update ([2a078b8](https://github.com/lukasborawski/vue-use-state-effect/commit/2a078b898c36abbb439f180f1fd853cac704f847))
- docs update

### 0.1.0 (20.05.2022)
* initial package state
* docs
* demos

- initial package state
- docs
- demos
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Vue Use State Effect

**CAUTION**: Built and tested for/with **Vue 3** and/or **Nuxt 3** (RC-2).
**CAUTION**: Built and tested for/with **Vue 3** and/or **Nuxt 3** (RC-12).

Fast and small library, built on top of the native `scopeEffect` **Vue 3 API** that will provide safe and sharable (across the app) state for your local composables and functions. It might be a good replacement for **Vuex** or **Pinia** state management, if you need smaller and less extensive solution.

Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"name": "vue-use-state-effect",
"version": "0.1.2",
"version": "0.1.4",
"description": "Fast and small library, built on top of the native Vue.js API that will provide a safe and sharable (across the app) state for your local composables and functions.",
"main": "lib/index.cjs.js",
"module": "lib/index.es.js",
"types": "lib/index.d.ts",
"files": [
"lib",
"README.md",
"CHANGELOG.md",
"LICENSE.md"
],
"scripts": {
"prepare": "husky install",
"build": "rimraf ./lib/ && rollup -c",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function useStateEffect(composable: Function, config: UseStateEffectConfi
* Current Vue Instance check.
*/
if (!getCurrentInstance()) {
if (!getCurrentInstance()) console.warn(`[${useStateEffectSig}] Unable to read current instance.`)
console.warn(`[${useStateEffectSig}] Unable to read current instance.`)
return ref<null>(null)
}
/**
Expand Down

0 comments on commit 8b27c0c

Please sign in to comment.