@terrazzo/cli 2.0.0-beta.5 → 2.0.0-beta.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/bin/cli.js +8 -4
  2. package/package.json +7 -8
package/bin/cli.js CHANGED
@@ -25,10 +25,10 @@
25
25
  * SOFTWARE.
26
26
  */
27
27
 
28
+ import fs from 'node:fs';
28
29
  import { createRequire } from 'node:module';
29
30
  import { parseArgs } from 'node:util';
30
31
  import { Logger } from '@terrazzo/parser';
31
- import dotenv from 'dotenv';
32
32
  import {
33
33
  buildCmd,
34
34
  checkCmd,
@@ -43,9 +43,13 @@ import {
43
43
 
44
44
  const require = createRequire(process.cwd());
45
45
 
46
- // Load env vars before anything else
47
- // (a user may not use these at all, but in the offchance they do)
48
- dotenv.config();
46
+ // Load .env file into process.env
47
+ for (const envFile of ['.env', 'production.env', 'development.env']) {
48
+ if (fs.existsSync(envFile)) {
49
+ process.loadEnvFile(envFile);
50
+ break;
51
+ }
52
+ }
49
53
 
50
54
  const [, , ...argsRaw] = process.argv;
51
55
  const { values: flags, positionals } = parseArgs({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@terrazzo/cli",
3
- "version": "2.0.0-beta.5",
3
+ "version": "2.0.0-beta.6",
4
4
  "description": "CLI for managing design tokens using the Design Tokens Community Group (DTCG) standard and generating code for any platform via plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -39,14 +39,12 @@
39
39
  "@clack/prompts": "^1.0.1",
40
40
  "@hono/node-server": "^1.19.9",
41
41
  "@humanwhocodes/momoa": "^3.3.10",
42
- "@types/escodegen": "^0.0.10",
43
- "chokidar": "^3.6.0",
42
+ "chokidar": "^5.0.0",
44
43
  "detect-package-manager": "^3.0.2",
45
- "dotenv": "^16.6.1",
46
- "dtcg-examples": "^1.0.2",
44
+ "dtcg-examples": "^1.0.3",
47
45
  "escodegen": "^2.1.0",
48
46
  "merge-anything": "^5.1.7",
49
- "meriyah": "^6.1.4",
47
+ "meriyah": "^7.1.0",
50
48
  "mime": "^4.1.0",
51
49
  "picocolors": "^1.1.1",
52
50
  "scule": "^1.3.0",
@@ -54,8 +52,8 @@
54
52
  "vite-node": "^5.3.0",
55
53
  "yaml-to-momoa": "0.0.8",
56
54
  "@terrazzo/json-schema-tools": "^0.2.0",
57
- "@terrazzo/parser": "^2.0.0-beta.5",
58
- "@terrazzo/token-tools": "^2.0.0-beta.5"
55
+ "@terrazzo/parser": "^2.0.0-beta.6",
56
+ "@terrazzo/token-tools": "^2.0.0-beta.6"
59
57
  },
60
58
  "devDependencies": {
61
59
  "@figma/rest-api-spec": "^0.36.0",
@@ -70,6 +68,7 @@
70
68
  "@swc/core-win32-arm64-msvc": "1.13.19",
71
69
  "@swc/core-win32-ia32-msvc": "1.13.19",
72
70
  "@swc/core-win32-x64-msvc": "1.13.19",
71
+ "@types/escodegen": "^0.0.10",
73
72
  "@vitejs/plugin-react-swc": "^4.2.3",
74
73
  "react": "^19.2.4",
75
74
  "react-dom": "^19.2.4"