Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@happytiptoe/ziggy-vue
Advanced tools
Install with your favourite package manager:
# yarn
yarn add ziggy-vue
# pnpm
pnpm add ziggy-vue
# npm
npm install ziggy-vue
Import as required:
// main.ts
import { createApp } from 'vue'
import { plugin as ZiggyVue } from 'ziggy-vue'
import App from './App.vue'
// create Vue app
const app = createApp(App)
// use ziggy-vue plugin
app.use(ZiggyVue)
Use in components:
<!-- script setup -->
<script setup lang="ts">
import { useRoute } from 'ziggy-vue'
const $route = useRoute()
const homeRoute = $route('home')
</script>
<!-- composition api -->
<script setup lang="ts">
import { defineComponent } from 'vue'
import { useRoute } from 'ziggy-vue'
export default defineComponent({
setup() {
const $route = useRoute()
const homeRoute = $route('home')
return { homeRoute }
}
})
</script>
<!-- options api -->
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
methods: {
getRoute(name: string) {
return this.$route(name)
}
},
computed: {
router() {
return this.$route()
}
}
})
</script>
<!-- template -->
<template>
<Link :href="$route('dashboard')">...</Link>
</template>
FAQs
Type-safe plugin for ziggy-js and vue
The npm package @happytiptoe/ziggy-vue receives a total of 0 weekly downloads. As such, @happytiptoe/ziggy-vue popularity was classified as not popular.
We found that @happytiptoe/ziggy-vue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.