rrule-temporal 1.1.4 → 1.1.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.
package/README.md CHANGED
@@ -140,7 +140,10 @@ toText(weekly, "es");
140
140
  `toText()` currently ships translations for **English (`en`)**,
141
141
  **Spanish (`es`)**, **Hindi (`hi`)**, **Cantonese (`yue`)**, **Arabic (`ar`)**,
142
142
  **Hebrew (`he`)** and **Mandarin (`zh`)**. At build time you can reduce bundle size by
143
- defining the `TOTEXT_LANGS` environment variable, e.g. `TOTEXT_LANGS=en,es,ar`.
143
+ defining the `TOTEXT_LANGS` environment variable (read from `process.env`),
144
+ e.g. `TOTEXT_LANGS=en,es,ar`. When this environment variable is unavailable
145
+ (such as in browser builds where `process` is undefined) all languages are
146
+ included by default.
144
147
 
145
148
  ### `toText` supported languages
146
149
 
package/dist/totext.cjs CHANGED
@@ -2004,7 +2004,7 @@ var zh = {
2004
2004
  ordinal: (n) => n < 0 ? "\u6700\u540E" : `\u7B2C${Math.abs(n)}`
2005
2005
  };
2006
2006
  var ALL_LOCALES = { en, es, hi, yue, ar, he, zh };
2007
- var env = process.env.TOTEXT_LANGS;
2007
+ var env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
2008
2008
  var active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
2009
2009
  var LOCALES = {};
2010
2010
  for (const l of active) {
package/dist/totext.js CHANGED
@@ -398,7 +398,7 @@ var zh = {
398
398
  ordinal: (n) => n < 0 ? "\u6700\u540E" : `\u7B2C${Math.abs(n)}`
399
399
  };
400
400
  var ALL_LOCALES = { en, es, hi, yue, ar, he, zh };
401
- var env = process.env.TOTEXT_LANGS;
401
+ var env = typeof process !== "undefined" && process.env ? process.env.TOTEXT_LANGS : void 0;
402
402
  var active = env ? env.split(",").map((s) => s.trim()).filter(Boolean) : Object.keys(ALL_LOCALES);
403
403
  var LOCALES = {};
404
404
  for (const l of active) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrule-temporal",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Recurrence rule processing using Temporal PlainDate/PlainDateTime",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "scripts": {
21
- "build": "tsup",
21
+ "build": "rm -rf dist && tsup",
22
22
  "test": "jest --coverage=false",
23
23
  "coverage": "jest",
24
24
  "format": "./node_modules/.bin/prettier --write 'src/**/*.ts'",