isomorfeus-redux 4.1.5 → 4.1.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d325b4ccf75305292aedde9cbac28ab68e905f8bf413c053680392b7dbca2c1
4
- data.tar.gz: d66a93f3d09874db0d9d3ebe0fd5635920a88e8dc69e0278f0a3ab46e612b358
3
+ metadata.gz: 77c295b38a66d51f3d3f66fe1910571769cdee72fdb8dd7d0ed4d6e5a129684c
4
+ data.tar.gz: e34ee9628b8553ef5975a03efa4b9f8090eae42ffff2596697b0f0dbc05708f8
5
5
  SHA512:
6
- metadata.gz: a3fcd9abb44175a86c2b78aa56085658568c8c0662baacb69c609a24306f771f0c4d33051e3f547de19b17b53cd685199e6b530bd62a2a7c7a20b81a9c011888
7
- data.tar.gz: 95fd2cb017bc9b3c1fc576d97c02d179f27dbf120e92a32cb81ed6edc3edd17cb9557fb95ae9889cfc6c2722d0f76dc9b9f64b6503ac035d3b36b0eec9a4f319
6
+ metadata.gz: a2c5ba6e42f5b4fb8827eb30174ed812aa37f02a236418b413e5f4e38a3a99140b50107cdf9af8d73dbeaafd197d4c36015a03c16b7987964ecb14f9a91800d3
7
+ data.tar.gz: b20e2d6a26d4933439f2f8dbd3a3d2e5d220b5da09d74fad92df9b60060dbfc439a959201e8dc4b5c0847ead5916842899dc566ee963eadbf65acd1d98c14fde
@@ -5,13 +5,8 @@ module Isomorfeus
5
5
  attr_accessor :on_ssr
6
6
  attr_accessor :on_server
7
7
  attr_accessor :on_desktop
8
- attr_accessor :on_ios
9
- attr_accessor :on_android
10
8
  attr_accessor :on_mobile
11
- attr_accessor :on_pad
12
- attr_accessor :on_database
13
- attr_accessor :on_tvos
14
- attr_accessor :on_androidtv
9
+ attr_accessor :on_tablet
15
10
  attr_accessor :on_tv
16
11
 
17
12
  def on_browser?
@@ -30,76 +25,40 @@ module Isomorfeus
30
25
  end
31
26
 
32
27
  def on_desktop?
33
- # true if running in electron
28
+ # true if running as desktop app
34
29
  @on_desktop
35
30
  end
36
31
 
37
- # TODO the following need to be reworked a little, as react native is no longer a target
38
- def on_ios?
39
- # true if running in react-native on ios
40
- @on_ios
41
- end
42
-
43
- def on_android?
44
- # true if running in react-native on android
45
- @on_android
46
- end
47
-
48
32
  def on_mobile?
49
- # true if running in react-native
33
+ # true if running on mobile
50
34
  @on_mobile
51
35
  end
52
36
 
53
- def on_pad?
54
- # true if running on a pad
55
- @on_pad
56
- end
57
-
58
- def on_database?
59
- # true if running in database context
60
- @on_database
61
- end
62
-
63
- def on_tvos?
64
- # true if running in react-native on tvOS
65
- @on_tvos
66
- end
67
-
68
- def on_androidtv?
69
- # true if running in react-native on androidtv
70
- @on_androidtv
37
+ def on_tablet?
38
+ # true if running on a tablet
39
+ @on_tablet
71
40
  end
72
41
 
73
42
  def on_tv?
74
- # true if running in react-native on a tv
43
+ # true if running on a tv
75
44
  @on_tv
76
45
  end
77
46
  end
78
47
 
79
- self.on_ssr = `(typeof process === 'object' && typeof process.release === 'object' && typeof process.release.name === 'string' && process.release.name === 'node') ? true : false`
48
+ self.on_ssr = `(typeof process === 'object' && typeof process.release === 'object' && typeof process.release.name === 'string' && process.release.name === 'node') ? true : false`
80
49
  self.on_desktop = false
81
- self.on_ios = `(typeof Platform === 'object' && Platform.OS.toLowerCase().includes('ios')) ? true : false`
82
- self.on_android = `(typeof Platform === 'object' && Platform.OS.toLowerCase().includes('android')) ? true : false`
83
- self.on_pad = `(typeof Platform === 'object') ? (Platform.OS.toLowerCase().includes('ios') && Platform.isPad) : false`
84
- self.on_tvos = `(typeof Platform === 'object') ? (Platform.isTV && Platform.OS.toLowerCase().includes('ios') && Platform.isTVOS) : false`
85
- self.on_androidtv = `(typeof Platform === 'object') ? (Platform.isTV && Platform.OS.toLowerCase().includes('android')) : false`
86
- self.on_tv = `(typeof Platform === 'object') ? Platform.isTV : false`
87
- self.on_mobile = self.on_ios? || self.on_android?
88
- self.on_database = false
50
+ self.on_tablet = false
51
+ self.on_tv = false
52
+ self.on_mobile = false
89
53
  self.on_server = false
90
- self.on_browser = !self.on_ssr? && !self.on_desktop? && !self.on_mobile? && !self.on_database? && !self.on_tv?
54
+ self.on_browser = !self.on_ssr? && !self.on_desktop? && !self.on_mobile? && !self.on_tv?
91
55
  else
92
56
  class << self
93
57
  def on_ssr?; false; end
94
58
  def on_desktop?; false; end
95
- def on_ios?; false; end
96
- def on_android?; false; end
97
59
  def on_mobile?; false; end
98
- def on_pad?; false; end
99
- def on_database?; false; end
60
+ def on_tablet?; false; end
100
61
  def on_browser?; false; end
101
- def on_tvos?; false; end
102
- def on_androidtv?; false; end
103
62
  def on_tv?; false; end
104
63
 
105
64
  def on_server?; true; end
@@ -7,7 +7,7 @@ module Isomorfeus
7
7
  if Dir.exist?(imports_path)
8
8
  %w[sass scss css].each do |ending|
9
9
  styles_file = File.join(imports_path, 'stylesheets.' + ending)
10
- Isomorfeus.add_web_js_import(styles_file) if File.exist(styles_file)
10
+ Isomorfeus.add_web_js_import(styles_file) if File.exist?(styles_file)
11
11
  end
12
12
  end
13
13
  Isomorfeus.add_common_js_import('redux', 'Redux', '*')
data/lib/redux/store.rb CHANGED
@@ -19,7 +19,7 @@ module Redux
19
19
  Isomorfeus.store.add_reducer(reducer)
20
20
  else
21
21
  # otherwise just add it to the reducers, so that they will be used when initializing the store
22
- preloaded_state[reducer.keys.first] = {} unless preloaded_state.has_key?(reducer.keys.first)
22
+ preloaded_state[reducer.keys.first] = {} unless preloaded_state.key?(reducer.keys.first)
23
23
  reducers.merge!(reducer)
24
24
  end
25
25
  end
@@ -174,7 +174,7 @@ module Redux
174
174
  t = `Date.now()`
175
175
  time_since_first = `t - first`
176
176
  # `console.log('delta', time_since_first)`
177
- return true if `typeof Opal.React !== 'undefined' && typeof Opal.React.render_buffer !== 'undefined' && Opal.React.render_buffer.length > 0 && time_since_first < 1000`
177
+ return true if `typeof Opal.Preact !== 'undefined' && typeof Opal.Preact.render_buffer !== 'undefined' && Opal.Preact.render_buffer.length > 0 && time_since_first < 1000`
178
178
  return false if time_since_first > 100 # ms
179
179
  return false if (`t - #@last_dispatch_time`) > 9 # ms
180
180
  return true
data/lib/redux/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Redux
2
- VERSION = '4.1.5'
2
+ VERSION = '4.1.9'
3
3
  end
data/lib/redux.rb CHANGED
@@ -58,7 +58,7 @@ module Redux
58
58
  def self.fetch_by_path(*path)
59
59
  # get active redux component
60
60
  %x{
61
- var active_component = Opal.React.active_redux_component();
61
+ var active_component = Opal.Preact.active_redux_component();
62
62
  var current_state;
63
63
  var final_data;
64
64
  var path_last = path.length - 1;
@@ -86,7 +86,7 @@ module Redux
86
86
 
87
87
  def self.get_state_path(state, *path)
88
88
  path.inject(state) do |state_el, path_el|
89
- if state_el.has_key?(path_el)
89
+ if state_el.key?(path_el)
90
90
  state_el[path_el]
91
91
  else
92
92
  return nil
@@ -100,7 +100,7 @@ module Redux
100
100
  if path_el == last_el
101
101
  state_el[path_el] = value
102
102
  state_el[path_el]
103
- elsif !state_el.has_key?(path_el)
103
+ elsif !state_el.key?(path_el)
104
104
  state_el[path_el] = {}
105
105
  state_el[path_el]
106
106
  else
@@ -15,9 +15,9 @@
15
15
  }
16
16
  },
17
17
  "node_modules/redux": {
18
- "version": "4.1.1",
19
- "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.1.tgz",
20
- "integrity": "sha512-hZQZdDEM25UY2P493kPYuKqviVwZ58lEmGQNeQ+gXa+U0gYPUBf7NKYazbe3m+bs/DzM/ahN12DbF+NG8i0CWw==",
18
+ "version": "4.1.2",
19
+ "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.2.tgz",
20
+ "integrity": "sha512-SH8PglcebESbd/shgf6mii6EIoRM0zrQyjcuQ+ojmfxjTtE0z9Y8pa62iA/OJ58qjP6j27uyW4kUF4jl/jd6sw==",
21
21
  "dependencies": {
22
22
  "@babel/runtime": "^7.9.2"
23
23
  }
@@ -0,0 +1,4 @@
1
+ # Change Log
2
+
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+ Every release, along with the migration instructions, is documented on the Github [Releases](https://github.com/reduxjs/redux/releases) page.
@@ -66,7 +66,7 @@ export type PreloadedState<S> = Required<S> extends EmptyObject
66
66
  ? {
67
67
  [K in keyof S1]?: S1[K] extends object ? PreloadedState<S1[K]> : S1[K]
68
68
  }
69
- : never
69
+ : S
70
70
  : {
71
71
  [K in keyof S]: S[K] extends string | number | boolean | symbol
72
72
  ? S[K]
@@ -1,108 +1,108 @@
1
- {
2
- "name": "redux",
3
- "version": "4.1.1",
4
- "description": "Predictable state container for JavaScript apps",
5
- "license": "MIT",
6
- "homepage": "http://redux.js.org",
7
- "repository": "github:reduxjs/redux",
8
- "bugs": "https://github.com/reduxjs/redux/issues",
9
- "keywords": [
10
- "redux",
11
- "reducer",
12
- "state",
13
- "predictable",
14
- "functional",
15
- "immutable",
16
- "hot",
17
- "live",
18
- "replay",
19
- "flux",
20
- "elm"
21
- ],
22
- "authors": [
23
- "Dan Abramov <dan.abramov@me.com> (https://github.com/gaearon)",
24
- "Andrew Clark <acdlite@me.com> (https://github.com/acdlite)"
25
- ],
26
- "main": "lib/redux.js",
27
- "unpkg": "dist/redux.js",
28
- "module": "es/redux.js",
29
- "typings": "./index.d.ts",
30
- "files": [
31
- "dist",
32
- "lib",
33
- "es",
34
- "src",
35
- "index.d.ts"
36
- ],
37
- "scripts": {
38
- "clean": "rimraf lib dist es coverage",
39
- "format": "prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
40
- "format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
41
- "lint": "eslint src test",
42
- "test": "jest",
43
- "test:watch": "npm test -- --watch",
44
- "test:cov": "npm test -- --coverage",
45
- "build": "rollup -c",
46
- "pretest": "npm run build",
47
- "prepublishOnly": "npm run clean && npm run format:check && npm run lint && npm test",
48
- "examples:lint": "eslint examples",
49
- "examples:test": "cross-env CI=true babel-node examples/testAll.js"
50
- },
51
- "dependencies": {
52
- "@babel/runtime": "^7.9.2"
53
- },
54
- "devDependencies": {
55
- "@babel/cli": "^7.8.4",
56
- "@babel/core": "^7.9.0",
57
- "@babel/node": "^7.8.7",
58
- "@babel/plugin-external-helpers": "^7.8.3",
59
- "@babel/plugin-proposal-object-rest-spread": "^7.9.5",
60
- "@babel/plugin-transform-runtime": "^7.9.0",
61
- "@babel/preset-env": "^7.9.5",
62
- "@babel/preset-flow": "^7.9.0",
63
- "@babel/preset-typescript": "^7.9.0",
64
- "@babel/register": "^7.9.0",
65
- "@rollup/plugin-babel": "^5.3.0",
66
- "@rollup/plugin-node-resolve": "^7.1.3",
67
- "@rollup/plugin-replace": "^2.3.2",
68
- "@types/jest": "^25.2.1",
69
- "@types/node": "^13.13.4",
70
- "@typescript-eslint/eslint-plugin": "^2.29.0",
71
- "@typescript-eslint/parser": "^2.29.0",
72
- "babel-eslint": "^10.1.0",
73
- "babel-jest": "^25.4.0",
74
- "cross-env": "^7.0.2",
75
- "eslint": "^6.8.0",
76
- "eslint-config-react-app": "^5.2.1",
77
- "eslint-import-resolver-typescript": "^2.0.0",
78
- "eslint-plugin-flowtype": "^4.7.0",
79
- "eslint-plugin-import": "^2.20.2",
80
- "eslint-plugin-jsx-a11y": "^6.2.3",
81
- "eslint-plugin-react": "^7.19.0",
82
- "eslint-plugin-react-hooks": "^3.0.0",
83
- "glob": "^7.1.6",
84
- "jest": "^25.4.0",
85
- "prettier": "^2.0.5",
86
- "rimraf": "^3.0.2",
87
- "rollup": "^2.7.2",
88
- "rollup-plugin-terser": "^5.3.0",
89
- "rollup-plugin-typescript2": "^0.27.0",
90
- "rxjs": "^6.5.5",
91
- "typescript": "^3.8.3",
92
- "typings-tester": "^0.3.2"
93
- },
94
- "npmName": "redux",
95
- "npmFileMap": [
96
- {
97
- "basePath": "/dist/",
98
- "files": [
99
- "*.js"
100
- ]
101
- }
102
- ],
103
- "jest": {
104
- "testRegex": "(/test/.*\\.spec\\.[tj]s)$",
105
- "coverageProvider": "v8"
106
- },
107
- "sideEffects": false
108
- }
1
+ {
2
+ "name": "redux",
3
+ "version": "4.1.2",
4
+ "description": "Predictable state container for JavaScript apps",
5
+ "license": "MIT",
6
+ "homepage": "http://redux.js.org",
7
+ "repository": "github:reduxjs/redux",
8
+ "bugs": "https://github.com/reduxjs/redux/issues",
9
+ "keywords": [
10
+ "redux",
11
+ "reducer",
12
+ "state",
13
+ "predictable",
14
+ "functional",
15
+ "immutable",
16
+ "hot",
17
+ "live",
18
+ "replay",
19
+ "flux",
20
+ "elm"
21
+ ],
22
+ "authors": [
23
+ "Dan Abramov <dan.abramov@me.com> (https://github.com/gaearon)",
24
+ "Andrew Clark <acdlite@me.com> (https://github.com/acdlite)"
25
+ ],
26
+ "main": "lib/redux.js",
27
+ "unpkg": "dist/redux.js",
28
+ "module": "es/redux.js",
29
+ "typings": "./index.d.ts",
30
+ "files": [
31
+ "dist",
32
+ "lib",
33
+ "es",
34
+ "src",
35
+ "index.d.ts"
36
+ ],
37
+ "scripts": {
38
+ "clean": "rimraf lib dist es coverage",
39
+ "format": "prettier --write \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
40
+ "format:check": "prettier --list-different \"{src,test}/**/*.{js,ts}\" index.d.ts \"**/*.md\"",
41
+ "lint": "eslint src test",
42
+ "test": "jest",
43
+ "test:watch": "npm test -- --watch",
44
+ "test:cov": "npm test -- --coverage",
45
+ "build": "rollup -c",
46
+ "pretest": "npm run build",
47
+ "prepublishOnly": "npm run clean && npm run format:check && npm run lint && npm test",
48
+ "examples:lint": "eslint examples",
49
+ "examples:test": "cross-env CI=true babel-node examples/testAll.js"
50
+ },
51
+ "dependencies": {
52
+ "@babel/runtime": "^7.9.2"
53
+ },
54
+ "devDependencies": {
55
+ "@babel/cli": "^7.8.4",
56
+ "@babel/core": "^7.9.0",
57
+ "@babel/node": "^7.8.7",
58
+ "@babel/plugin-external-helpers": "^7.8.3",
59
+ "@babel/plugin-proposal-object-rest-spread": "^7.9.5",
60
+ "@babel/plugin-transform-runtime": "^7.9.0",
61
+ "@babel/preset-env": "^7.9.5",
62
+ "@babel/preset-flow": "^7.9.0",
63
+ "@babel/preset-typescript": "^7.9.0",
64
+ "@babel/register": "^7.9.0",
65
+ "@rollup/plugin-babel": "^5.3.0",
66
+ "@rollup/plugin-node-resolve": "^7.1.3",
67
+ "@rollup/plugin-replace": "^2.3.2",
68
+ "@types/jest": "^25.2.1",
69
+ "@types/node": "^13.13.4",
70
+ "@typescript-eslint/eslint-plugin": "^2.29.0",
71
+ "@typescript-eslint/parser": "^2.29.0",
72
+ "babel-eslint": "^10.1.0",
73
+ "babel-jest": "^25.4.0",
74
+ "cross-env": "^7.0.2",
75
+ "eslint": "^6.8.0",
76
+ "eslint-config-react-app": "^5.2.1",
77
+ "eslint-import-resolver-typescript": "^2.0.0",
78
+ "eslint-plugin-flowtype": "^4.7.0",
79
+ "eslint-plugin-import": "^2.20.2",
80
+ "eslint-plugin-jsx-a11y": "^6.2.3",
81
+ "eslint-plugin-react": "^7.19.0",
82
+ "eslint-plugin-react-hooks": "^3.0.0",
83
+ "glob": "^7.1.6",
84
+ "jest": "^25.4.0",
85
+ "prettier": "^2.0.5",
86
+ "rimraf": "^3.0.2",
87
+ "rollup": "^2.7.2",
88
+ "rollup-plugin-terser": "^5.3.0",
89
+ "rollup-plugin-typescript2": "^0.27.0",
90
+ "rxjs": "^6.5.5",
91
+ "typescript": "^3.8.3",
92
+ "typings-tester": "^0.3.2"
93
+ },
94
+ "npmName": "redux",
95
+ "npmFileMap": [
96
+ {
97
+ "basePath": "/dist/",
98
+ "files": [
99
+ "*.js"
100
+ ]
101
+ }
102
+ ],
103
+ "jest": {
104
+ "testRegex": "(/test/.*\\.spec\\.[tj]s)$",
105
+ "coverageProvider": "v8"
106
+ },
107
+ "sideEffects": false
108
+ }
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorfeus-redux",
3
3
  "dependencies": {
4
- "redux": "^4.1.1"
4
+ "redux": "4.1.2"
5
5
  }
6
6
  }
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-redux
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.5
4
+ version: 4.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-06 00:00:00.000000000 Z
11
+ date: 2021-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opal
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2.0
19
+ version: 1.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2.0
26
+ version: 1.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: isomorfeus-asset-manager
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.12.1
33
+ version: 0.13.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.12.1
40
+ version: 0.13.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: isomorfeus-speednode
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.4.1
47
+ version: 0.4.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.4.1
54
+ version: 0.4.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -276,6 +276,7 @@ files:
276
276
  - node_modules/@babel/runtime/helpers/writeOnlyError.js
277
277
  - node_modules/@babel/runtime/package.json
278
278
  - node_modules/@babel/runtime/regenerator/index.js
279
+ - node_modules/redux/CHANGELOG.md
279
280
  - node_modules/redux/LICENSE.md
280
281
  - node_modules/redux/README.md
281
282
  - node_modules/redux/dist/redux.js
@@ -323,7 +324,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
323
324
  - !ruby/object:Gem::Version
324
325
  version: '0'
325
326
  requirements: []
326
- rubygems_version: 3.2.15
327
+ rubygems_version: 3.2.22
327
328
  signing_key:
328
329
  specification_version: 4
329
330
  summary: Redux and Stores for Isomorfeus.