@mittwald/react-ghostmaker 1.5.2 → 1.5.3

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.
@@ -1,8 +1,15 @@
1
1
  import is from "@sindresorhus/is";
2
2
  const store = new Map();
3
+ const isDev = typeof process !== "undefined" && process.env.NODE_ENV !== "production";
3
4
  const testNameConflict = (name) => {
4
5
  if (Array.from(store.values()).some((meta) => meta.name === name)) {
5
- throw new Error(`GhostMakerModel name conflict: A model with the name "${name}" is already registered.`);
6
+ const message = `GhostMakerModel name conflict: A model with the name "${name}" is already registered.`;
7
+ if (isDev) {
8
+ console.warn(message);
9
+ }
10
+ else {
11
+ throw new Error(message);
12
+ }
6
13
  }
7
14
  };
8
15
  export function GhostMakerModel(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/react-ghostmaker",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "author": "Mittwald CM Service GmbH & Co. KG <opensource@mittwald.de>",
5
5
  "contributors": [
6
6
  "Marco Falkenberg <m.falkenberg@mittwald.de>"
@@ -49,6 +49,7 @@
49
49
  "@tanstack/react-query": "^5.90.20",
50
50
  "@testing-library/dom": "^10.4.1",
51
51
  "@testing-library/react": "^16.3.2",
52
+ "@types/node": "^24.10.12",
52
53
  "@types/react": "^19.2.13",
53
54
  "@types/react-dom": "^19.2.3",
54
55
  "@typescript-eslint/eslint-plugin": "^8.54.0",