Skip to content

Commit 2c0de2d

Browse files
authored
Merge pull request #327 from pryrt/pluginCompatibility
plugins: add description of the new JSON attribute
2 parents e302069 + 75448e2 commit 2c0de2d

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

content/docs/plugins.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,62 @@ and the rest should be intuitive.
333333
name as the **folder-name** and the plugin DLL file should be placed at the root
334334
level of the ZIP file. Otherwise Plugin Admin won't install it. Any additionals
335335
files (DLL or data) can be placed at the root level or in an arbitrary subfolder.
336+
7. Compatibility: In March 2022, two new parameters were added to the JSON file format,
337+
to indicate your plugin's compatibility with various versions of Notepad++, called
338+
`npp-compatible-versions` and `old-versions-compatibility`.
339+
340+
1. The first will have the format
341+
```
342+
"npp-compatible-versions": "[minimum,maximum]",
343+
```
344+
where _minimum_ and _maximum_ are version numbers; if _minimum_ is empty, it will
345+
mean that the plugin will work with any version of Notepad++ before (and including) the _maximum_;
346+
if _maximum_ is empty, it will mean that the plugin will work with any version of
347+
Notepad++ after (and including) the _minimum_; you cannot set both empty.
348+
The version numbers will be dotted versions, such as `8.0`, `8.2`, `8.3.1` . If you
349+
have spaces anywhere between the `[]` brackets, it will not work.
350+
351+
example | meaning
352+
---|---
353+
`[7.7,8.2.1]` | The plugin is known to work with v7.7 thru v8.2.1
354+
`[,8.2.1]` | The plugin is known to work with any version up thru v8.2.1
355+
`[8.3.1,]` | The plugin is known to work with v8.3.1 and beyond
356+
`[ 7.7,8.2.1]` | ERROR: space after the `[`
357+
`[7.7 ,8.2.1]` | ERROR: space before the `,`
358+
`[8.3.1, ]` | ERROR: space after the `,`
359+
`[7.7,8.2.1 ]` | ERROR: space before the `]`
360+
`[,]` | ERROR: must have at least one of _minimum_ and _maximum_
361+
362+
You can see examples of working values in the other entries in the JSON file.
363+
2. The second will have the form
364+
```
365+
"old-versions-compatibility": "[pluginminimum,pluginmaximum][nppminimum,nppmaximum]",
366+
```
367+
The `old-versions-compatibility` will explain the ranges of versions for your plugin
368+
that worked with older versions of Notepad++. This is essentially giving the last
369+
pair of Plugin & Notepad++ versions that should work.
370+
371+
For example, if you are releasing your plugin's version 2.7 to be able to work with
372+
Notepad++ v8.3.1 and newer, and if your old plugin versions 1 through 2.6 worked up
373+
through Notepad++ v8.2.1, the two attributes in the JSON should look like:
374+
```
375+
"version": "2.7",
376+
"npp-compatible-versions": "[8.3.1,]",
377+
"old-versions-compatibility": "[,2.6][,8.2.1]",
378+
```
379+
(Where the first line gives the recent plugin version, the second line is telling
380+
what versions of Notepad++ the new plugin works with, and the third line explains
381+
that older versions of your plugin work with Notepad++ versions up through and
382+
including 8.2.1.)
383+
384+
Similar to npp-compatible-versions, you cannot have spaces inside or between the `[]`.
385+
You may leave out the _pluginminimum_ and/or _nppminimum_, as shown in the examples,
386+
but it likely doesn't make sense to leave out either of the maximums.
387+
388+
If both of those attributes are missing, it is interpreted that your plugin has no API calls
389+
that are incompatible with any version of Notepad++, and it will run with and not crash any
390+
version of Notepad++. Before submitting a plugin without those attributes, please be certain
391+
of the historical compatibility. Thank you.
336392
337393
### Do your PR to join plugin list
338394

0 commit comments

Comments
 (0)