@warp-drive/ember 5.7.0-alpha.30 → 5.7.0-alpha.32

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/dist/index.js +8 -3
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { service } from '@ember/service';
2
2
  import Component from '@glimmer/component';
3
3
  import { cached } from '@glimmer/tracking';
4
- import { macroCondition, moduleExists, importSync, getGlobalConfig } from '@embroider/macros';
4
+ import { macroCondition, getGlobalConfig, moduleExists, importSync } from '@embroider/macros';
5
5
  import { getPromiseState, DISPOSE, createRequestSubscription } from '@warp-drive/core/store/-private';
6
6
  export { createRequestSubscription, getPromiseState, getRequestState } from '@warp-drive/core/store/-private';
7
7
  import { precompileTemplate } from '@ember/template-compilation';
@@ -27,8 +27,13 @@ class Throw extends Component {
27
27
  super(owner, args);
28
28
  // this error is opaque (user supplied) so we don't validate it
29
29
  // as an Error instance.
30
- // eslint-disable-next-line @typescript-eslint/no-throw-literal
31
- throw this.args.error;
30
+ if (macroCondition(getGlobalConfig().WarpDrive.env.PRODUCTION)) {
31
+ // eslint-disable-next-line no-console
32
+ console.error(this.args.error);
33
+ } else {
34
+ // eslint-disable-next-line @typescript-eslint/only-throw-error
35
+ throw this.args.error;
36
+ }
32
37
  }
33
38
  static {
34
39
  setComponentTemplate(precompileTemplate("", {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@warp-drive/ember",
3
3
  "description": "Data bindings and utilities for Ember applications using WarpDrive",
4
- "version": "5.7.0-alpha.30",
4
+ "version": "5.7.0-alpha.32",
5
5
  "license": "MIT",
6
6
  "author": "Chris Thoburn <runspired@users.noreply.github.com>",
7
7
  "repository": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@embroider/macros": "^1.18.1",
41
- "@warp-drive/core": "5.7.0-alpha.30"
41
+ "@warp-drive/core": "5.7.0-alpha.32"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "ember-provide-consume-context": {
@@ -60,8 +60,8 @@
60
60
  "@embroider/addon-dev": "^7.1.5",
61
61
  "@ember/test-helpers": "5.2.0",
62
62
  "@ember/test-waiters": "^4.1.0",
63
- "@warp-drive/internal-config": "5.7.0-alpha.30",
64
- "@warp-drive/core": "5.7.0-alpha.30",
63
+ "@warp-drive/internal-config": "5.7.0-alpha.32",
64
+ "@warp-drive/core": "5.7.0-alpha.32",
65
65
  "babel-plugin-ember-template-compilation": "^2.4.1",
66
66
  "ember-template-imports": "^4.3.0",
67
67
  "ember-source": "~6.6.0",