@inglorious/logo 2.0.4 → 2.0.6

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/utils.test.js +0 -46
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/logo",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "The Inglorious Coderz logo, remade to be compatible with Inglorious Web.",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -34,17 +34,17 @@
34
34
  },
35
35
  "files": [
36
36
  "src",
37
+ "!src/**/*.test.js",
37
38
  "types"
38
39
  ],
39
40
  "publishConfig": {
40
41
  "access": "public"
41
42
  },
42
43
  "dependencies": {
43
- "@inglorious/web": "2.6.1"
44
+ "@inglorious/web": "3.0.1"
44
45
  },
45
46
  "devDependencies": {
46
47
  "prettier": "^3.6.2",
47
- "vite": "^7.1.3",
48
48
  "vitest": "^4.0.15",
49
49
  "@inglorious/eslint-config": "1.1.1"
50
50
  },
package/src/utils.test.js DELETED
@@ -1,46 +0,0 @@
1
- /**
2
- * @vitest-environment jsdom
3
- */
4
- import { describe, expect, it } from "vitest"
5
-
6
- import { closestAncestor, saturate } from "./utils.js"
7
-
8
- describe("utils", () => {
9
- describe("saturate", () => {
10
- it("clamps positive values to the limit", () => {
11
- expect(saturate(10, 5)).toBe(5)
12
- })
13
-
14
- it("clamps negative values to -limit", () => {
15
- expect(saturate(-10, 5)).toBe(-5)
16
- })
17
-
18
- it("returns value when within limits", () => {
19
- expect(saturate(3, 5)).toBe(3)
20
- })
21
- })
22
-
23
- describe("closestAncestor", () => {
24
- it("finds an ancestor by class name up to the search depth", () => {
25
- const root = document.createElement("div")
26
- root.className = "logo"
27
-
28
- const child1 = document.createElement("div")
29
- const child2 = document.createElement("div")
30
- const leaf = document.createElement("span")
31
-
32
- root.appendChild(child1)
33
- child1.appendChild(child2)
34
- child2.appendChild(leaf)
35
-
36
- const found = closestAncestor(leaf, "logo")
37
- expect(found).toBe(root)
38
- })
39
-
40
- it("returns null when ancestor not found or invalid className", () => {
41
- const el = document.createElement("div")
42
- const result = closestAncestor(el, "non-existent")
43
- expect(result).toBeUndefined()
44
- })
45
- })
46
- })