@unsass/selector 1.3.0 → 1.4.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/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
4
4
 
5
+ ## 1.4.0 (2026-01-03)
6
+
7
+ * ci: add `release.config.js` ([6fb94ff](https://github.com/unsass/selector/commit/6fb94ff))
8
+ * ci: lint code ([e7c5ae5](https://github.com/unsass/selector/commit/e7c5ae5))
9
+ * ci: rename `node.js.yml` to `publish.yml` ([bdfb2a2](https://github.com/unsass/selector/commit/bdfb2a2))
10
+ * ci: update `commit-msg` ([7f78c1c](https://github.com/unsass/selector/commit/7f78c1c))
11
+ * feat: use the plain-CSS if() syntax ([bfda10e](https://github.com/unsass/selector/commit/bfda10e))
12
+ * chore: switch to ESM ([faee4d8](https://github.com/unsass/selector/commit/faee4d8))
13
+ * chore(deps-dev): bump to `@commitlint/cli` 20.3.0 ([581c39e](https://github.com/unsass/selector/commit/581c39e))
14
+ * chore(deps-dev): bump to `sass-true` 10.1.0 ([125f7b4](https://github.com/unsass/selector/commit/125f7b4))
15
+ * chore(deps-dev): bump to `stylelint` 16.26.1 ([9249a20](https://github.com/unsass/selector/commit/9249a20))
16
+ * chore(deps-dev): prevent dependencies vulnerabilities ([311b5f1](https://github.com/unsass/selector/commit/311b5f1))
17
+ * chore(deps): bump to `@commitlint/cli` 20.1.0 ([7873ab3](https://github.com/unsass/selector/commit/7873ab3))
18
+ * chore(deps): bump to `sass-true` 8.1.0 ([796746d](https://github.com/unsass/selector/commit/796746d))
19
+ * chore(deps): bump to `sass-true` 9.0.0 ([c6f302c](https://github.com/unsass/selector/commit/c6f302c))
20
+ * chore(deps): bump to `sass` 1.97.1 ([3dfbf70](https://github.com/unsass/selector/commit/3dfbf70))
21
+ * chore(deps): bump to `semantic-release` 25.0.1 ([93db310](https://github.com/unsass/selector/commit/93db310))
22
+ * chore(deps): bump to `stylelint-config-unsass` 2.0.0 ([ccb922e](https://github.com/unsass/selector/commit/ccb922e))
23
+ * chore(deps): bump to `stylelint-config-unsass` 2.2.0 ([04e20fa](https://github.com/unsass/selector/commit/04e20fa))
24
+ * chore(deps): clean `package-lock.json` ([65d4a3d](https://github.com/unsass/selector/commit/65d4a3d))
25
+ * chore(deps): prevent dependencies vulnerabilities ([b3fbab9](https://github.com/unsass/selector/commit/b3fbab9))
26
+ * test(deps): switch from jest to vitest ([8c3ed03](https://github.com/unsass/selector/commit/8c3ed03))
27
+
5
28
  ## [1.3.0](https://github.com/unsass/selector/compare/v1.2.0...v1.3.0) (2023-09-11)
6
29
 
7
30
 
package/package.json CHANGED
@@ -1,39 +1,36 @@
1
1
  {
2
2
  "name": "@unsass/selector",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Sass functions and mixins to manage CSS selectors.",
5
+ "type": "module",
5
6
  "scripts": {
6
7
  "lint:css": "stylelint --fix \"**/*.scss\"",
7
8
  "lint": "npm-run-all --parallel lint:*",
8
- "test": "jest",
9
+ "test": "vitest",
9
10
  "prepare": "husky install",
10
11
  "release": "semantic-release"
11
12
  },
12
13
  "engines": {
13
- "node": ">=16.0.0",
14
- "npm": ">=8.0.0"
14
+ "node": ">=18"
15
15
  },
16
16
  "sass": "index.scss",
17
17
  "devDependencies": {
18
- "@commitlint/cli": "^17.7.1",
19
- "@commitlint/config-conventional": "^17.7.0",
18
+ "@commitlint/cli": "^20.3.0",
19
+ "@commitlint/config-conventional": "^20.3.0",
20
20
  "@semantic-release/changelog": "^6.0.3",
21
21
  "@semantic-release/git": "^10.0.1",
22
- "glob": "^7.2.0",
23
- "husky": "^8.0.3",
24
- "jest": "^29.5.0",
25
- "jest-environment-node-single-context": "^29.0.0",
26
- "jest-junit": "^15.0.0",
22
+ "husky": "^9.1.7",
27
23
  "npm-run-all": "^4.1.5",
28
- "sass-true": "^7.0.0",
29
- "semantic-release": "^21.1.1",
30
- "stylelint": "^15.3.0",
31
- "stylelint-config-unsass": "^1.0.1"
24
+ "sass-true": "^10.1.0",
25
+ "semantic-release": "^25.0.2",
26
+ "stylelint": "^16.26.1",
27
+ "stylelint-config-unsass": "^2.2.0",
28
+ "vitest": "^4.0.16"
32
29
  },
33
30
  "dependencies": {
34
31
  "@unsass/string": "^1.4.2",
35
32
  "@unsass/types": "^1.0.2",
36
- "sass": "^1.66.1"
33
+ "sass": "^1.97.1"
37
34
  },
38
35
  "keywords": [
39
36
  "sass",
@@ -31,7 +31,7 @@
31
31
  /// @example - scss
32
32
  /// $selector: pseudo-class(".foo", "before");
33
33
  /// // ".foo::before"
34
- //
34
+ ///
35
35
  /// @access public
36
36
  ///
37
37
  @function pseudo-element($selector, $pseudo-element) {
@@ -42,7 +42,7 @@
42
42
  /// @example - scss
43
43
  /// $selector: to-id("foo");
44
44
  /// // "#foo"
45
- //
45
+ ///
46
46
  /// @access public
47
47
  ///
48
48
  @function to-id($selector) {
package/src/_mixins.scss CHANGED
@@ -63,13 +63,13 @@
63
63
  ///
64
64
  @mixin create($selector, $scope: null, $separator: ":", $suffix: false, $pseudo-class: null, $pseudo-element: null, $root: false) {
65
65
  @if $pseudo-class and $suffix {
66
- @error "You cannot add a suffix with a selector that already has a pseudo-class."
66
+ @error "You cannot add a suffix with a selector that already has a pseudo-class.";
67
67
  } @else if $pseudo-element and $suffix {
68
- @error "You cannot add a suffix with a selector that already has a pseudo-element."
68
+ @error "You cannot add a suffix with a selector that already has a pseudo-element.";
69
69
  }
70
70
 
71
- $selector: if(type.is-list($selector), "#{list.nth($selector, 1)}", $selector);
72
- $class-selector: string.slice($selector, 1, 1) == ".";
71
+ $selector: if(sass(type.is-list($selector)): "#{list.nth($selector, 1)}"; else: $selector);
72
+ $class-selector: string.slice($selector, 1, 1) == ".";
73
73
 
74
74
  @if $class-selector {
75
75
  $selector: string.slice($selector, 2);