Socket
Socket
Sign inDemoInstall

@sanity/incompatible-plugin

Package Overview
Dependencies
Maintainers
33
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/incompatible-plugin - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

lib/IncompatiblePlugin.js

@@ -83,3 +83,3 @@ "use strict";

' ',
react_1.default.createElement("a", { href: "#" }, "Sanity Studio V3"),
react_1.default.createElement("a", { href: "https://www.sanity.io/studio-v3" }, "Sanity Studio V3"),
".")),

@@ -100,3 +100,3 @@ react_1.default.createElement(ui_1.Card, null,

react_1.default.createElement(ui_1.Text, null,
react_1.default.createElement("a", { href: "#" }, " About Sanity Studio versions"))))))));
react_1.default.createElement("a", { href: "https://beta.sanity.io/docs/platform/studio/v2-to-v3" }, "About Sanity Studio versions"))))))));
}

@@ -110,3 +110,3 @@ exports.IncompatiblePlugins = IncompatiblePlugins;

}
var yarnCommand = "yarn add ".concat(plugins.map(function (p) { return "".concat(p.name, "@\"").concat(p.versions.v2, "\""); }).join(' '));
var yarnCommand = "yarn add ".concat(plugins.map(function (p) { return "".concat(p.name, "@").concat(p.versions.v2); }).join(' '));
return (react_1.default.createElement(react_1.default.Fragment, null,

@@ -113,0 +113,0 @@ react_1.default.createElement(ui_1.Text, null,

{
"name": "@sanity/incompatible-plugin",
"version": "1.0.1",
"version": "1.0.2",
"description": "Display an error dialog in Sanity Studio v2 when a v3 plugin has been installed.",
"keywords": [
"sanity",
"sanity-plugin"
],
"homepage": "https://github.com/sanity-io/incompatible-plugin#readme",
"bugs": {
"url": "https://github.com/sanity-io/incompatible-plugin/issues"
},
"repository": {
"type": "git",
"url": "git@github.com:sanity-io/incompatible-plugin.git"
},
"license": "MIT",
"author": "Sanity.io <hello@sanity.io>",
"main": "./lib/index.js",
"source": "./src/index.tsx",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",

@@ -12,54 +26,53 @@ "files": [

],
"keywords": [
"sanity",
"sanity-plugin"
],
"author": "",
"license": "MIT",
"scripts": {
"clean": "rimraf lib",
"prebuild": "npm run clean",
"build": "tsc",
"watch": "tsc -w",
"format": "prettier src -w",
"clean": "rimraf lib",
"compile": "tsc --noEmit",
"format": "prettier --ignore-path .gitignore -w .",
"lint": "eslint .",
"prepare": "husky install",
"compile": "tsc --noEmit",
"prepublishOnly": "npm run build",
"lint": "eslint ."
"watch": "tsc -w"
},
"dependencies": {
"@sanity/icons": "^1.3.4",
"@sanity/ui": "^0.38.0",
"@reach/auto-id": "^0.17.0",
"react-copy-to-clipboard": "^5.1.0"
},
"peerDependencies": {
"react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.9.0 || ^17.0.0 || ^18.0.0",
"styled-components": "^5.0.0"
},
"devDependencies": {
"@commitlint/cli": "^16.1.0",
"@commitlint/config-conventional": "^15.0.0",
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@sanity/icons": "^1.3.6",
"@sanity/semantic-release-preset": "^2.0.1",
"@sanity/ui": "^0.37.22",
"@types/react": "^18.0.10",
"@types/react-copy-to-clipboard": "^5.0.2",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^18.0.5",
"@types/styled-components": "^5.1.25",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"eslint": "^8.14.0",
"@types/styled-components": "^5.1.26",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"eslint": "^8.24.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-sanity": "^6.0.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.5.0",
"husky": "^7.0.0",
"lint-staged": "^12.3.3",
"prettier": "^2.6.2",
"react": "^17.0.0 ",
"react-dom": "^17.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1",
"prettier-plugin-packagejson": "^2.2.18",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"rimraf": "^3.0.2",
"styled-components": "^5.3.5",
"typescript": "4.7.3"
"styled-components": "^5.3.6",
"typescript": "4.8.4",
"yalc": "^1.0.0-pre.53"
},
"peerDependencies": {
"@sanity/icons": "^1.3",
"@sanity/ui": "*",
"react": "^16.9 || ^17 || ^18",
"react-dom": "^16.9 || ^17 || ^18",
"styled-components": "^5.2"
}
}

@@ -10,3 +10,5 @@ # @sanity/incompatible-plugin

```
or
or
```bash

@@ -21,2 +23,3 @@ yarn add @sanity/incompatible-plugin

`v2-incompatible.js`
```js

@@ -31,6 +34,6 @@ const {showIncompatiblePluginDialog} = require('@sanity/incompatible-plugin')

// Optional: If there is not v2 version of your plugin, v2 can be omitted
v2: '^1.2.5',
v2: '^1.2.5',
},
// Optional: Feel free to put this as field in package.json and import it alongside name and version above
sanityExchangeUrl: 'https://www.sanity.io/plugins/<plugin-on-sanity-exchanged>'
sanityExchangeUrl: 'https://www.sanity.io/plugins/<plugin-on-sanity-exchanged>',
})

@@ -40,2 +43,3 @@ ```

`sanity.json`
```json

@@ -56,16 +60,10 @@ {

{
"files": [
"src",
"lib",
"v2-incompatible.js",
"sanity.json"
]
"files": ["src", "lib", "v2-incompatible.js", "sanity.json"]
}
```
Done!
Done!
If your v3 plugin gets installed in a V2 studio by mistake, a dialog will display how to fix it.
## Develop

@@ -79,2 +77,1 @@

Semantic release will only release on configured branches, so it is safe to run release on any branch.

Sorry, the diff of this file is not supported yet

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