perfectionist-plugins 1.0.1 → 1.0.2
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/README.md +2 -14
- package/hide-unowned-skins.js +2 -2
- package/package.json +1 -1
- package/perfectionist-utils.js +2 -1
package/README.md
CHANGED
|
@@ -48,31 +48,19 @@ Built for [Pengu Loader](https://pengu.lol)
|
|
|
48
48
|
2. Move the `Perfectionism` folder into your Pengu Loader `plugins` folder.
|
|
49
49
|
3. Restart the League Client.
|
|
50
50
|
|
|
51
|
-
That's it. The folder holds one tiny loader file
|
|
51
|
+
That's it. The folder holds one tiny loader file. The plugins themselves come from the
|
|
52
52
|
[`perfectionist-plugins`](https://www.npmjs.com/package/perfectionist-plugins) npm package the
|
|
53
53
|
first time the client starts. Install, remove and toggle plugins in **Settings → Perfectionism**.
|
|
54
54
|
|
|
55
|
-
<br>
|
|
56
|
-
|
|
57
55
|
## Updates
|
|
58
56
|
|
|
59
|
-
Every time the client starts, the loader checks npm for a newer version and runs it
|
|
57
|
+
Every time the client starts, the loader checks npm for a newer version and runs it. Publishing
|
|
60
58
|
a new version of the npm package **is** the update. If a new version appears while the client is
|
|
61
59
|
already open, the suite downloads it with a progress window and restarts the client at a safe
|
|
62
60
|
moment (never in the middle of a game). You never replace files by hand.
|
|
63
61
|
|
|
64
62
|
<br>
|
|
65
63
|
|
|
66
|
-
## Publishing an update (maintainers)
|
|
67
|
-
|
|
68
|
-
1. Bump `version` in `package.json`.
|
|
69
|
-
2. Run `npm publish` from the repo root (first time only: `npm login` first).
|
|
70
|
-
|
|
71
|
-
That's the whole release process — every install picks the new version up on its own. Never edit
|
|
72
|
-
anything inside the `Perfectionism` folder: that one file stays the same for everyone.
|
|
73
|
-
|
|
74
|
-
<br>
|
|
75
|
-
|
|
76
64
|
---
|
|
77
65
|
|
|
78
66
|
<div align="center">
|
package/hide-unowned-skins.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const version = "2.1.
|
|
1
|
+
export const version = "2.1.1";
|
|
2
2
|
|
|
3
3
|
const PLUGIN_ID = "hide-unowned-skins";
|
|
4
4
|
const STYLE_ID = "perfectionist-hide-unowned-skins-style";
|
|
@@ -34,7 +34,7 @@ let clientSkinOrder = [];
|
|
|
34
34
|
function readDefaultEnabled() {
|
|
35
35
|
try {
|
|
36
36
|
const saved = JSON.parse(localStorage.getItem(STATE_KEY) || "{}");
|
|
37
|
-
return saved[PLUGIN_ID] !== false;
|
|
37
|
+
return saved.enabled?.[PLUGIN_ID] !== false;
|
|
38
38
|
} catch {
|
|
39
39
|
return true;
|
|
40
40
|
}
|
package/package.json
CHANGED
package/perfectionist-utils.js
CHANGED
|
@@ -33,7 +33,7 @@ const BUNDLED_MODULES = [
|
|
|
33
33
|
id: "hide-unowned-skins",
|
|
34
34
|
file: "hide-unowned-skins.js",
|
|
35
35
|
name: "Hide Unowned Skins",
|
|
36
|
-
version: "2.1.
|
|
36
|
+
version: "2.1.1",
|
|
37
37
|
description: "In champion select, only shows the skins you own for the picked champion.",
|
|
38
38
|
},
|
|
39
39
|
];
|
|
@@ -315,6 +315,7 @@ async function runUpdate(target) {
|
|
|
315
315
|
win.setProgress(i / files.length);
|
|
316
316
|
try {
|
|
317
317
|
const response = await fetch(`${CDN}/${PKG}@${target}/${files[i].file}`);
|
|
318
|
+
if (response.status === 404 && files[i].id) continue;
|
|
318
319
|
if (!response.ok) throw new Error(`download failed (${response.status})`);
|
|
319
320
|
const text = await response.text();
|
|
320
321
|
if (!text || !/export/.test(text)) throw new Error("the downloaded file looks invalid");
|