@terrazzo/parser 0.0.13 → 0.0.15

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/config.js +4 -2
  2. package/package.json +3 -3
package/config.js CHANGED
@@ -65,8 +65,10 @@ export default function defineConfig(rawConfig, { logger = new Logger(), cwd } =
65
65
  } else if (typeof config.outDir !== 'string') {
66
66
  logger.error({ label: 'config.outDir', message: `Expected string, received ${JSON.stringify(config.outDir)}` });
67
67
  } else {
68
- // note: always add trailing slash so URL treats it as a directory
69
- config.outDir = new URL(config.outDir.replace(TRAILING_SLASH_RE, '/'), cwd);
68
+ config.outDir = new URL(config.outDir, cwd);
69
+ // always add trailing slash so URL treats it as a directory.
70
+ // do AFTER it has been normalized to POSIX paths with `href` (don’t use Node internals here! This may run in the browser)
71
+ config.outDir = new URL(config.outDir.href.replace(TRAILING_SLASH_RE, '/'));
70
72
  }
71
73
 
72
74
  // config.plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrazzo/parser",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Parser/validator for the Design Tokens Community Group (DTCG) standard.",
5
5
  "type": "module",
6
6
  "author": {
@@ -39,10 +39,10 @@
39
39
  "picocolors": "^1.0.1",
40
40
  "wildcard-match": "^5.1.3",
41
41
  "yaml": "^2.5.0",
42
- "@terrazzo/token-tools": "^0.0.6"
42
+ "@terrazzo/token-tools": "^0.0.8"
43
43
  },
44
44
  "devDependencies": {
45
- "esbuild": "^0.23.0",
45
+ "esbuild": "^0.23.1",
46
46
  "yaml-to-momoa": "^0.0.1"
47
47
  },
48
48
  "scripts": {