Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@pinia/colada
Advanced tools
The missing data fetching library for Pinia
This is a more complete and production-ready (not yet!) version of the exercises from Mastering Pinia.
[!WARNING] Pinia Colada is still experimental and not ready for production. New versions might introduce breaking changes. Feedback regarding new and existing options and features is welcome!
Pinia Colada is an opinionated yet flexible data fetching layer on top of Pinia. It's built as a set of pinia plugins, stores and composables to benefit from Pinia's features and ecosystem. Pinia Colada has:
npm install pinia @pinia/colada
Install the plugins for the features you need:
import { createPinia } from 'pinia'
import { QueryPlugin } from '@pinia/colada'
app.use(createPinia())
// install after pinia
app.use(QueryPlugin, {
// optional options
})
<script lang="ts" setup>
import { useRoute } from 'vue-router'
import { useMutation, useQuery } from '@pinia/colada'
import { updateContact as _updateContact, getContactById } from '~/api/contacts'
const route = useRoute()
const { data: contact, isFetching } = useQuery({
// recognizes this query as ['contacts', id]
key: () => ['contacts', route.params.id],
query: () => getContactById(route.params.id),
})
const { mutate: updateContact } = useMutation({
// automatically invalidates the cache for ['contacts'] and ['contacts', id]
keys: ({ id }) => [['contacts'], ['contacts', id]],
mutation: _updateContact,
})
</script>
<template>
<section>
<ContactCard
:key="contact.id"
:contact="contact"
:is-updating="isFetching"
@update:contact="updateContact"
/>
</section>
</template>
0.7.0 (2024-07-26)
UseEntryKey
to EntryKey
QueryPlugin
in favor of PiniaColada
(bde53d9)FAQs
The smart data fetching layer for Pinia
The npm package @pinia/colada receives a total of 985 weekly downloads. As such, @pinia/colada popularity was classified as not popular.
We found that @pinia/colada demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.