@khanacademy/perseus-linter 0.0.0-PR725-20230913204151 → 0.0.0-PR745-20230928001000

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/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import Rule from "./rule";
2
+ export { default as libVersion } from "./version";
2
3
  export { linterContextProps, linterContextDefault } from "./proptypes";
3
4
  export type { LinterContextProps } from "./types";
4
5
  declare const allLintRules: ReadonlyArray<any>;
package/dist/index.js CHANGED
@@ -1550,6 +1550,23 @@ class Stack {
1550
1550
  }
1551
1551
  }
1552
1552
 
1553
+ // This file is processed by a Rollup plugin (replace) to inject the production
1554
+ // version number during the release build.
1555
+ // In dev, you'll never see the version number.
1556
+
1557
+ const libName = "@khanacademy/perseus-linter";
1558
+ const libVersion = "0.3.4"; // Injected by the build in rollup.config.js;
1559
+
1560
+ /**
1561
+ * Log library version to the console.
1562
+ */
1563
+ if (globalThis && !globalThis.PERSEUS_SILENCE_LOGGING) {
1564
+ let prefix = "v";
1565
+ const printString = " * ".concat(libName, " ").concat(prefix).concat(libVersion, " * ");
1566
+ // eslint-disable-next-line no-console
1567
+ console.log("%c".concat(printString), "background: #000; color: #fff");
1568
+ }
1569
+
1553
1570
  // Define the shape of the linter context object that is passed through the
1554
1571
  const linterContextProps = PropTypes__default["default"].shape({
1555
1572
  contentType: PropTypes__default["default"].string,
@@ -1822,6 +1839,7 @@ function pushContextStack(context, name) {
1822
1839
  }
1823
1840
 
1824
1841
  exports.Rule = Rule;
1842
+ exports.libVersion = libVersion;
1825
1843
  exports.linterContextDefault = linterContextDefault;
1826
1844
  exports.linterContextProps = linterContextProps;
1827
1845
  exports.pushContextStack = pushContextStack;