chalker 1.3.0 → 1.3.1

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/lib/index.js +4 -2
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -65,10 +65,12 @@ const htmlEntities = {
65
65
  };
66
66
 
67
67
  function loadColors() {
68
- const colors = optionalRequire("chalk") || optionalRequire("ansi-colors");
68
+ let colors = optionalRequire("chalk") || optionalRequire("ansi-colors");
69
69
 
70
70
  if (!colors) {
71
- throw new Error("chalker requires either chalk or ansi-colors to be installed");
71
+ // just go for chalk and let require take care of errors
72
+ colors = require("chalk");
73
+ // throw new Error("chalker requires either chalk or ansi-colors to be installed");
72
74
  }
73
75
 
74
76
  return normalizeColors(colors);
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "chalker",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Set ansi colors in strings using XML and chalk",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/jchip/chalker.git"
8
+ "url": "git+https://github.com/jchip/chalker.git"
9
9
  },
10
10
  "scripts": {
11
11
  "test": "xrun --serial test:unit test:demo",