js-routes 1.4.13 → 1.4.14

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 597119aa17518bd0b078b80c99c5f2e2a4cb4f5fa58526872b8d960acb9b6102
4
- data.tar.gz: 285c6f0aca0c140822e89b65afead328bbddc6eb3a08ef85944b68e8c3068515
3
+ metadata.gz: f8a952ba9e2f582074e459b770227628ee2cecf37cd50d03978ba9690bac5a94
4
+ data.tar.gz: 151da0e08b1b47fd6caa3bfbb1a5311ac0a528a9c88bb53b05dea181438823fb
5
5
  SHA512:
6
- metadata.gz: 501157d25557db0b0511acaa3226ca0fefbb3520bbec48ca9f1005e7300eb2dc0c115e9eae42ef085c17a78c8f2c0822c8b226cb8df639f20a81d9b62de6a421
7
- data.tar.gz: fecba94667f0a316142d03b8c5b4ca3a95790278a65de6c2b247805d82c16adece41d1a5f395af38913dbd811cdd2c6ad4a8b80c3cae2b30ecc5eec96a27a1c3
6
+ metadata.gz: 586fc3bcbef2fc96c12b0d53b5f9fd58eb19b8f5987ca7a6dac068ecc6865c363a4207e69afd4d0fe0c6d252d7b0c507428c7257a99cabf6fc34ba0c5afe29ea
7
+ data.tar.gz: 10276a454e7f07fe6166957c18516214c34853859f4e8645e06105984e80fb18b77016cbc398a1cdd5351eba6f4d38ce78555f34498be04f35e353c341500c75
@@ -1,5 +1,9 @@
1
1
  ## master
2
2
 
3
+ ## v1.4.14
4
+
5
+ * Fix compatibility with UMD modules #237 [Comment](https://github.com/railsware/js-routes/issues/237#issuecomment-752754679)
6
+
3
7
  ## v1.4.13
4
8
 
5
9
  * Improve compatibility with node environment #269.
@@ -1,3 +1,3 @@
1
1
  class JsRoutes
2
- VERSION = "1.4.13"
2
+ VERSION = "1.4.14"
3
3
  end
@@ -4,7 +4,7 @@ Based on Rails RAILS_VERSION routes of APP_CLASS
4
4
  */
5
5
 
6
6
  (function() {
7
- var DeprecatedGlobbingBehavior, NodeTypes, ParameterMissing, ReservedOptions, SpecialOptionsKey, UriEncoderSegmentRegex, Utils, result,
7
+ var DeprecatedGlobbingBehavior, NodeTypes, ParameterMissing, ReservedOptions, SpecialOptionsKey, UriEncoderSegmentRegex, Utils, error, result,
8
8
  hasProp = {}.hasOwnProperty,
9
9
  slice = [].slice;
10
10
 
@@ -511,7 +511,14 @@ Based on Rails RAILS_VERSION routes of APP_CLASS
511
511
  return result;
512
512
  });
513
513
  } else if (typeof module !== "undefined" && module !== null) {
514
- module.exports = result;
514
+ try {
515
+ module.exports = result;
516
+ } catch (error1) {
517
+ error = error1;
518
+ if (error.name !== 'TypeError') {
519
+ throw error;
520
+ }
521
+ }
515
522
  } else {
516
523
  Utils.namespace(this, NAMESPACE, result);
517
524
  }
@@ -404,7 +404,11 @@ if typeof define is "function" and define.amd
404
404
  define [], -> result
405
405
  else if module?
406
406
  # CommonJS
407
- module.exports = result
407
+ try
408
+ module.exports = result
409
+ catch error
410
+ unless error.name == 'TypeError'
411
+ throw error
408
412
  else
409
413
  # Browser globals
410
414
  Utils.namespace(this, NAMESPACE, result)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: js-routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.13
4
+ version: 1.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Gusiev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2021-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  requirements: []
206
- rubygems_version: 3.0.8
206
+ rubygems_version: 3.2.0
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: Brings Rails named routes to javascript