Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@modyfi/vite-plugin-yaml

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modyfi/vite-plugin-yaml - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

3

dist/index.d.ts

@@ -33,4 +33,7 @@ import { Schema, YAMLException } from 'js-yaml';

};
/**
* Transform YAML files to JS objects.
*/
declare const _default: (options?: PluginOptions) => Plugin;
export { PluginOptions, _default as default };

2

dist/index.js

@@ -5,3 +5,3 @@ // src/index.ts

import toSource from "tosource";
var yamlExtension = /\.yaml$/;
var yamlExtension = /\.ya?ml$/;
var src_default = (options = { schema: DEFAULT_SCHEMA }) => ({

@@ -8,0 +8,0 @@ name: "vite:transform-yaml",

{
"name": "@modyfi/vite-plugin-yaml",
"version": "1.0.2",
"version": "1.0.3",
"description": "Import YAML files as JS objects 🔌",

@@ -45,27 +45,23 @@ "type": "module",

"peerDependencies": {
"vite": "^2.6.0"
"vite": "^2.6.0 || ^3.0.0"
},
"dependencies": {
"@rollup/pluginutils": "^4.1.2",
"js-yaml": "^4.1.0",
"tosource": "^2.0.0-alpha.3"
"@rollup/pluginutils": "4.2.1",
"js-yaml": "4.1.0",
"tosource": "2.0.0-alpha.3"
},
"devDependencies": {
"@types/js-yaml": "^4.0.5",
"c8": "^7.11.0",
"tsup": "^5.11.13",
"typescript": "^4.5.5",
"vite": "2.7.10",
"vitest": "^0.5.5"
"@types/js-yaml": "4.0.5",
"c8": "7.12.0",
"tsup": "5.12.8",
"typescript": "4.7.4",
"vite": "3.0.4"
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"dev": "tsup --watch src",
"example:dev": "pnpm -C example run dev",
"example:build": "pnpm run build && npm -C example run build",
"build": "tsup",
"test": "vitest",
"test:watch": "vitest -w",
"coverage": "vitest run --coverage"
},
"readme": "# 🧹 vite-plugin-yaml\n\nTransforms a YAML file into a JS object.\n\n## 🚀 Install\n\n```\nnpm install -D @modyfi/vite-plugin-yaml\n# or\n# yarn add -D @modyfi/vite-plugin-yaml\n# or\n# pnpm i -D @modyfi/vite-plugin-yaml\n```\n\n## 🦄 Usage\n\nAdd `ViteYAML` to `vite.config.js / vite.config.ts`:\n\n```ts\n// vite.config.js / vite.config.ts\nimport ViteYaml from '@modyfi/vite-plugin-yaml';\n\nexport default {\n plugins: [\n ViteYaml(), // you may configure the plugin by passing in an object with the options listed below\n ],\n};\n```\n\n### 🔦 TypeScript support\n\nThe recommended way to add type definitions for `.yaml` or `.yml` modules is via a `tsconfig.json` file.\n\n```json\n// tsconfig.json\n{\n \"compilerOptions\": {\n ...\n \"types\": [\n ...\n \"@modyfi/vite-plugin-yaml/modules\"\n ],\n }\n}\n```\n\nYou may also add type definitions without `tsconfig`:\n\n```ts\n// vite-env.d.ts\n/// <reference types=\"@modyfi/vite-plugin-yaml/modules\" />\n```\n\n## 🐛 Options\n\n```ts\n/**\n * A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should operate on.\n *\n * By default all files are targeted.\n */\ninclude?: FilterPattern;\n/**\n * A minimatch pattern, or array of patterns, which specifies the files in the build the plugin should ignore.\n *\n * By default no files are ignored.\n */\nexclude?: FilterPattern;\n/**\n * Schema used to parse yaml files.\n *\n * @see https://github.com/nodeca/js-yaml/blob/49baadd52af887d2991e2c39a6639baa56d6c71b/README.md#load-string---options-\n */\nschema?: Schema;\n/**\n * A function that will be called for error reporting.\n *\n * Defaults to `console.warn()`.\n */\nonWarning?: (warning: YAMLException) => void;\n```\n"
"example:build": "pnpm run build && pnpm -C example run build",
"build": "tsup"
}
}

@@ -0,1 +1,3 @@

[![Pipeline](https://github.com/Modyfi/vite-plugin-yaml/actions/workflows/pipeline.yml/badge.svg)](https://github.com/Modyfi/vite-plugin-yaml/actions/workflows/pipeline.yml)
# 🧹 vite-plugin-yaml

@@ -34,3 +36,3 @@

```json
```ts
// tsconfig.json

@@ -37,0 +39,0 @@ {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc