@bridge-ds/stylelint-plugin 0.2.18 → 0.2.20

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/dist/index.js +2 -1
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -918,7 +918,7 @@ var DEFAULT_PRODUCTS = [
918
918
  ];
919
919
  var KEY = /^[a-z0-9][a-z0-9-]*$/;
920
920
  var REPO = /^[\w.-]+\/[\w.-]+$/;
921
- var FIELDS = ["key", "name", "repo", "path", "preview", "framework", "default"];
921
+ var FIELDS = ["key", "name", "repo", "path", "preview", "production", "framework", "default"];
922
922
  function productProblems(raw) {
923
923
  if (raw === void 0) return [];
924
924
  if (!Array.isArray(raw)) return ['"products" must be a list of { "key", "name" } objects'];
@@ -944,6 +944,7 @@ function productProblems(raw) {
944
944
  if (bad) problems.push(`${at}.path" must be a folder relative to the repository root, without a leading "/" or "..", such as "apps/admin"`);
945
945
  }
946
946
  if (o.preview !== void 0 && (typeof o.preview !== "string" || !/^https?:\/\//.test(o.preview))) problems.push(`${at}.preview" must be an http(s) URL template, such as "https://app-git-{branch}.vercel.app"`);
947
+ if (o.production !== void 0 && (typeof o.production !== "string" || !/^https?:\/\/[^{}\s]+$/.test(o.production))) problems.push(`${at}.production" must be the product's production URL, without placeholders, such as "https://shop.example.com"`);
947
948
  if (o.framework !== void 0 && (typeof o.framework !== "string" || !o.framework.trim())) problems.push(`${at}.framework" must be a name such as "react", "vue" or "other"`);
948
949
  if (o.default !== void 0 && typeof o.default !== "boolean") problems.push(`${at}.default" must be true or false`);
949
950
  if (o.default === true) defaults++;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bridge-ds/stylelint-plugin",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "type": "module",
5
5
  "description": "Stylelint rule bridge/use-tokens: no raw colors, lengths, radii, shadows, durations or z-index in product CSS where a design token exists. Autofixes exact matches. Reads the tokens through @bridge-ds/core and bridge.config.json.",
6
6
  "license": "MIT",
@@ -56,6 +56,6 @@
56
56
  "stylelint": "16.26.1"
57
57
  },
58
58
  "dependencies": {
59
- "@bridge-ds/core": "^0.20.0"
59
+ "@bridge-ds/core": "^0.22.0"
60
60
  }
61
61
  }