@sanity/plugin-kit 0.0.1-studio-v3.4 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,5 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2020 Espen Hovlandsdal
4
3
  Copyright (c) 2022 Sanity.io
5
4
 
6
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **NOTE**
4
4
  >
5
- > This is a developer preview package is meant for **Sanity Studio v3** plugin development.
5
+ > This is a developer preview package meant for **Sanity Studio v3** plugin development.
6
6
  >
7
7
  > For a v2 alternative, consider using [Sanipack](https://github.com/rexxars/sanipack).
8
8
 
@@ -49,7 +49,7 @@ Parcel uses a build cache, you probably want to put `.parcel-cache` into `.gitig
49
49
  First, run the init command:
50
50
  ```bash
51
51
  # Initialize a new plugin (outside of your Sanity studio folder)
52
- npx @sanity/plugin-kit@latest init sanity-plugin-testing-it-out
52
+ npx @sanity/plugin-kit init sanity-plugin-testing-it-out
53
53
 
54
54
  # Make your plugin linkable, and compile an initial version
55
55
  cd sanity-plugin-testing-it-out
@@ -86,7 +86,7 @@ Since the plugin is running in watch mode, any changes you make to the plugin co
86
86
 
87
87
  Verify that the plugin package is configured correctly by running:
88
88
 
89
- > npx @sanity/plugin-kit@latest verify-package
89
+ > npx @sanity/plugin-kit verify-package
90
90
 
91
91
  ### What does it do?
92
92
 
@@ -116,7 +116,7 @@ Simply use the `verify-package` command in a v2 plugin package, and it will noti
116
116
  plugin to v3.
117
117
 
118
118
  ```sh
119
- npx @sanity/plugin-kit@latest verify-package
119
+ npx @sanity/plugin-kit verify-package
120
120
  ```
121
121
 
122
122
  ## Upgrade help in V2 Studio
@@ -125,7 +125,7 @@ You can use the `verify-studio` command in a v2 Sanity Studio to get some of the
125
125
  to v3.
126
126
 
127
127
  ```sh
128
- npx @sanity/plugin-kit@latest verify-studio
128
+ npx @sanity/plugin-kit verify-studio
129
129
  ```
130
130
 
131
131
  This will:
@@ -138,10 +138,10 @@ This will:
138
138
 
139
139
  ```sh
140
140
  ## for plugins
141
- npx @sanity/plugin-kit@latest verify-package --single
141
+ npx @sanity/plugin-kit verify-package --single
142
142
 
143
143
  ## for studio
144
- npx @sanity/plugin-kit@latest verify-package --studio --single
144
+ npx @sanity/plugin-kit verify-package --studio --single
145
145
  ```
146
146
 
147
147
  This will only output the first validation that fails. Useful when working through the list of issues by fixing and rerunning the command.
@@ -168,7 +168,7 @@ This will publish the plugin to a local [yalc](https://github.com/wclr/yalc) reg
168
168
  In another shell, in your test Sanity Studio directory, run:
169
169
 
170
170
  ```sh
171
- npx yalc add <your-plugin-package> --link && yarn install
171
+ npx yalc add <your-plugin-package> && npx yalc add <your-plugin-package> --link && npm install
172
172
  ```
173
173
 
174
174
  You can now change your plugin code, which will:
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/plugin-kit",
3
- "version": "0.0.1-studio-v3.4",
3
+ "version": "1.0.0",
4
4
  "description": "Enhanced Sanity.io plugin development experience",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",
@@ -14,8 +14,7 @@
14
14
  "lint": "eslint .",
15
15
  "compile": "tsc --noEmit",
16
16
  "format": "prettier src -w",
17
- "semantic-release": "semantic-release",
18
- "prepublishOnly": "npm run build"
17
+ "prepublishOnly": "npm run test && npm run build"
19
18
  },
20
19
  "binname": "sanity-plugin",
21
20
  "source": "./src/index.ts",
@@ -30,7 +29,7 @@
30
29
  ],
31
30
  "repository": {
32
31
  "type": "git",
33
- "url": "git+ssh://git@github.com/rexxars/sanipack.git"
32
+ "url": "git+ssh://git@github.com/sanity-io/plugin-kit.git"
34
33
  },
35
34
  "engines": {
36
35
  "node": ">=14.0.0"
@@ -47,9 +46,9 @@
47
46
  "author": "Sanity.io <hello@sanity.io>",
48
47
  "license": "MIT",
49
48
  "bugs": {
50
- "url": "https://github.com/rexxars/sanipack/issues"
49
+ "url": "https://github.com/sanity-io/plugin-kit/issues"
51
50
  },
52
- "homepage": "https://github.com/rexxars/sanipack#readme",
51
+ "homepage": "https://github.com/sanity-io/plugin-kit#readme",
53
52
  "dependencies": {
54
53
  "@rexxars/choosealicense-list": "^1.1.2",
55
54
  "chalk": "^4.1.2",
@@ -87,6 +86,7 @@
87
86
  "@commitlint/config-conventional": "^16.2.1",
88
87
  "@parcel/packager-ts": "^2.6.0",
89
88
  "@parcel/transformer-typescript-types": "^2.6.0",
89
+ "@sanity/semantic-release-preset": "^1.1.3",
90
90
  "@types/eslint": "^8.4.3",
91
91
  "@types/inquirer": "^8.2.1",
92
92
  "@types/node": "^17.0.40",
@@ -105,8 +105,7 @@
105
105
  "prettier": "^2.6.2",
106
106
  "readdirp": "^3.6.0",
107
107
  "rimraf": "^3.0.2",
108
- "semantic-release": "^19.0.2",
109
- "sanity": "^2.30.1-purple-unicorn.940",
108
+ "sanity": "^3.0.0-dev-preview.7",
110
109
  "sinon": "^14.0.0",
111
110
  "tap": "^16.2.0",
112
111
  "ts-node": "^10.8.0",
@@ -37,6 +37,7 @@ const fs_1 = __importDefault(require("fs"));
37
37
  const path_1 = __importDefault(require("path"));
38
38
  const log_1 = __importDefault(require("../util/log"));
39
39
  const package_1 = require("../npm/package");
40
+ const outdent_1 = __importDefault(require("outdent"));
40
41
  function linkWatch({ basePath }) {
41
42
  var _a;
42
43
  return __awaiter(this, void 0, void 0, function* () {
@@ -51,9 +52,12 @@ function linkWatch({ basePath }) {
51
52
  const pkg = yield (0, package_1.getPackage)({ basePath, validate: false });
52
53
  nodemon_1.default
53
54
  .on('start', function () {
54
- log_1.default.info(`Watching ${watch.folder} for changes to files with extensions: ${watch.extensions}`);
55
- log_1.default.info(`\nTo test this package in another repository directory run:`);
56
- log_1.default.success(`yalc add --link \n${pkg.name} && yarn install`);
55
+ log_1.default.info((0, outdent_1.default) `
56
+ Watching ${watch.folder} for changes to files with extensions: ${watch.extensions}
57
+
58
+ To test this package in another repository directory run:
59
+ ${chalk_1.default.greenBright(`npx yalc add ${pkg.name} && npx yalc link ${pkg.name} && npm install`)}
60
+ `.trimStart());
57
61
  })
58
62
  .on('quit', function () {
59
63
  process.exit();
@@ -1 +1 @@
1
- {"version":3,"file":"link-watch.js","sourceRoot":"","sources":["../../../src/actions/link-watch.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;EAYE;;;;;;;;;;;;;;;AAEF;;;EAGE;AAEF,sDAA6B;AAC7B,gEAAuC;AACvC,kDAAyB;AACzB,4CAAmB;AACnB,gDAAuB;AACvB,sDAA6B;AAC7B,4CAAyC;AAYzC,SAAsB,SAAS,CAAC,EAAC,QAAQ,EAAqB;;;QAC5D,MAAM,WAAW,GAAgB,IAAI,CAAC,KAAK,CACzC,YAAE,CAAC,YAAY,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAClE,CAAA;QAED,MAAM,KAAK,mBACT,MAAM,EAAE,KAAK,EACb,OAAO,EAAE,eAAe,EACxB,UAAU,EAAE,yBAAyB,IAClC,MAAA,WAAW,CAAC,YAAY,0CAAE,SAAS,CACvC,CAAA;QAED,IAAA,iBAAO,EAAC;YACN,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC;YACrB,GAAG,EAAE,KAAK,CAAC,UAAU;YACrB,IAAI,EAAE,qBAAqB;YAC3B,aAAa;SACd,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,IAAA,oBAAU,EAAC,EAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAA;QAEzD,iBAAO;aACJ,EAAE,CAAC,OAAO,EAAE;YACX,aAAG,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC,MAAM,0CAA0C,KAAK,CAAC,UAAU,EAAE,CAAC,CAAA;YAC9F,aAAG,CAAC,IAAI,CAAC,6DAA6D,C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qBAAqB;YAC3B,aAAa;SACd,CAAC,CAAA;QAEF,MAAM,GAAG,GAAG,MAAM,IAAA,oBAAU,EAAC,EAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC,CAAA;QAEzD,iBAAO;aACJ,EAAE,CAAC,OAAO,EAAE;YACX,aAAG,CAAC,IAAI,CACN,IAAA,iBAAO,EAAA;mBACI,KAAK,CAAC,MAAM,0CAA0C,KAAK,CAAC,UAAU;;;UAG/E,eAAK,CAAC,WAAW,CAAC,gBAAgB,GAAG,CAAC,IAAI,qBAAqB,GAAG,CAAC,IAAI,iBAAiB,CAAC;OAC5F,CAAC,SAAS,EAAE,CACZ,CAAA;QACH,CAAC,CAAC;aACD,EAAE,CAAC,MAAM,EAAE;YACV,OAAO,CAAC,IAAI,EAAE,CAAA;QAChB,CAAC,CAAC;aACD,EAAE,CAAC,SAAS,EAAE,UAAU,KAAU;YACjC,aAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE,eAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA;YAC/D,aAAG,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAA;QACzC,CAAC,CAAC,CAAA;QAEJ,IAAA,sBAAY,EAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;;CAC9B;AAzCD,8BAyCC"}
@@ -37,7 +37,7 @@ tap_1.default.test('plugin-kit init -> verify-package -> tsc > parcel build', (t
37
37
  const tsc = yield (0, execa_1.default)('tsc', ['--noEmit'], { cwd: outputDir });
38
38
  console.error(`"tsc --noEmit" done in ${seconds()}.\nRunning "parcel build"...`);
39
39
  start = new Date().getTime();
40
- const build = yield (0, execa_1.default)('parcel', ['build'], { cwd: outputDir });
40
+ const build = yield (0, execa_1.default)('parcel', ['build', '--no-cache'], { cwd: outputDir });
41
41
  console.error(`"parcel build" done in ${seconds()}.`);
42
42
  return {
43
43
  stdout: (0, outdent_1.default) `
@@ -1 +1 @@
1
- {"version":3,"file":"init-verify-build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AE,KAAK,CAAC,CAAC,EAC3C;gBACE,kBAAkB;gBAClB,sBAAsB;gBACtB,cAAc;gBACd,kBAAkB;gBAClB,cAAc;gBACd,kBAAkB;aACnB,CAAC,GAAG,CAAC,yBAAS,CAAC,EAChB,qCAAqC,CACtC,CAAA;QACH,CAAC,CAAA;KACF,CAAC,CAAA;AACJ,CAAC,CAAA,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/plugin-kit",
3
- "version": "0.0.1-studio-v3.4",
3
+ "version": "1.0.0",
4
4
  "description": "Enhanced Sanity.io plugin development experience",
5
5
  "scripts": {
6
6
  "clean": "rimraf lib",
@@ -14,8 +14,7 @@
14
14
  "lint": "eslint .",
15
15
  "compile": "tsc --noEmit",
16
16
  "format": "prettier src -w",
17
- "semantic-release": "semantic-release",
18
- "prepublishOnly": "npm run build"
17
+ "prepublishOnly": "npm run test && npm run build"
19
18
  },
20
19
  "binname": "sanity-plugin",
21
20
  "source": "./src/index.ts",
@@ -30,7 +29,7 @@
30
29
  ],
31
30
  "repository": {
32
31
  "type": "git",
33
- "url": "git+ssh://git@github.com/rexxars/sanipack.git"
32
+ "url": "git+ssh://git@github.com/sanity-io/plugin-kit.git"
34
33
  },
35
34
  "engines": {
36
35
  "node": ">=14.0.0"
@@ -47,9 +46,9 @@
47
46
  "author": "Sanity.io <hello@sanity.io>",
48
47
  "license": "MIT",
49
48
  "bugs": {
50
- "url": "https://github.com/rexxars/sanipack/issues"
49
+ "url": "https://github.com/sanity-io/plugin-kit/issues"
51
50
  },
52
- "homepage": "https://github.com/rexxars/sanipack#readme",
51
+ "homepage": "https://github.com/sanity-io/plugin-kit#readme",
53
52
  "dependencies": {
54
53
  "@rexxars/choosealicense-list": "^1.1.2",
55
54
  "chalk": "^4.1.2",
@@ -87,6 +86,7 @@
87
86
  "@commitlint/config-conventional": "^16.2.1",
88
87
  "@parcel/packager-ts": "^2.6.0",
89
88
  "@parcel/transformer-typescript-types": "^2.6.0",
89
+ "@sanity/semantic-release-preset": "^1.1.3",
90
90
  "@types/eslint": "^8.4.3",
91
91
  "@types/inquirer": "^8.2.1",
92
92
  "@types/node": "^17.0.40",
@@ -105,8 +105,7 @@
105
105
  "prettier": "^2.6.2",
106
106
  "readdirp": "^3.6.0",
107
107
  "rimraf": "^3.0.2",
108
- "semantic-release": "^19.0.2",
109
- "sanity": "^2.30.1-purple-unicorn.940",
108
+ "sanity": "^3.0.0-dev-preview.7",
110
109
  "sinon": "^14.0.0",
111
110
  "tap": "^16.2.0",
112
111
  "ts-node": "^10.8.0",
@@ -24,6 +24,7 @@ import fs from 'fs'
24
24
  import path from 'path'
25
25
  import log from '../util/log'
26
26
  import {getPackage} from '../npm/package'
27
+ import outdent from 'outdent'
27
28
 
28
29
  interface YalcWatchConfig {
29
30
  folder?: string
@@ -58,9 +59,14 @@ export async function linkWatch({basePath}: {basePath: string}) {
58
59
 
59
60
  nodemon
60
61
  .on('start', function () {
61
- log.info(`Watching ${watch.folder} for changes to files with extensions: ${watch.extensions}`)
62
- log.info(`\nTo test this package in another repository directory run:`)
63
- log.success(`yalc add --link \n${pkg.name} && yarn install`)
62
+ log.info(
63
+ outdent`
64
+ Watching ${watch.folder} for changes to files with extensions: ${watch.extensions}
65
+
66
+ To test this package in another repository directory run:
67
+ ${chalk.greenBright(`npx yalc add ${pkg.name} && npx yalc link ${pkg.name} && npm install`)}
68
+ `.trimStart()
69
+ )
64
70
  })
65
71
  .on('quit', function () {
66
72
  process.exit()