govuk_publishing_components 16.29.0 → 17.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +46 -23
  3. data/app/assets/javascripts/govuk_publishing_components/components/feedback.js +8 -2
  4. data/app/assets/javascripts/govuk_publishing_components/lib/cookie-functions.js +101 -21
  5. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +9 -2
  6. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +0 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +4 -6
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_cookie-banner.scss +36 -5
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_heading.scss +14 -14
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_highlight-boxes.scss +23 -23
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_inverse-header.scss +8 -8
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_lead-paragraph.scss +2 -2
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_metadata.scss +8 -8
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +10 -10
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_previous-and-next-navigation.scss +11 -14
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_related-navigation.scss +14 -14
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_share-links.scss +8 -8
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-header.scss +7 -7
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav-related.scss +20 -16
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_subscription-links.scss +4 -4
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_success-alert.scss +5 -5
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-list.scss +5 -5
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_title.scss +8 -8
  24. data/app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss +1 -1
  25. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +33 -25
  26. data/app/views/govuk_publishing_components/components/_error_summary.html.erb +4 -2
  27. data/app/views/govuk_publishing_components/components/_notice.html.erb +4 -1
  28. data/app/views/govuk_publishing_components/components/docs/cookie_banner.yml +2 -0
  29. data/app/views/govuk_publishing_components/components/docs/error_summary.yml +6 -0
  30. data/app/views/govuk_publishing_components/components/docs/notice.yml +6 -0
  31. data/app/views/govuk_publishing_components/components/docs/success_alert.yml +1 -1
  32. data/lib/govuk_publishing_components/presenters/cookie_banner_helper.rb +0 -4
  33. data/lib/govuk_publishing_components/version.rb +1 -1
  34. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js +1 -1
  35. data/node_modules/accessible-autocomplete/dist/accessible-autocomplete.min.js.map +1 -1
  36. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js +1 -1
  37. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.preact.min.js.map +1 -1
  38. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js +1 -1
  39. data/node_modules/accessible-autocomplete/dist/lib/accessible-autocomplete.react.min.js.map +1 -1
  40. data/node_modules/accessible-autocomplete/package.json +3 -3
  41. data/node_modules/accessible-autocomplete/src/autocomplete.js +4 -2
  42. data/node_modules/accessible-autocomplete/src/wrapper.js +5 -1
  43. data/node_modules/d/CHANGELOG.md +9 -0
  44. data/node_modules/d/CHANGES +4 -0
  45. data/node_modules/d/LICENSE +12 -16
  46. data/node_modules/d/README.md +49 -19
  47. data/node_modules/d/auto-bind.js +11 -10
  48. data/node_modules/d/index.js +23 -24
  49. data/node_modules/d/lazy.js +21 -23
  50. data/node_modules/d/package.json +63 -16
  51. data/node_modules/d/test/auto-bind.js +6 -7
  52. data/node_modules/d/test/index.js +78 -51
  53. data/node_modules/d/test/lazy.js +65 -50
  54. data/node_modules/es6-weak-map/CHANGELOG.md +5 -0
  55. data/node_modules/es6-weak-map/LICENSE +12 -16
  56. data/node_modules/es6-weak-map/README.md +34 -19
  57. data/node_modules/es6-weak-map/implement.js +9 -5
  58. data/node_modules/es6-weak-map/index.js +2 -2
  59. data/node_modules/es6-weak-map/is-implemented.js +10 -9
  60. data/node_modules/es6-weak-map/is-native-implemented.js +3 -3
  61. data/node_modules/es6-weak-map/is-weak-map.js +8 -8
  62. data/node_modules/es6-weak-map/package.json +30 -19
  63. data/node_modules/es6-weak-map/polyfill.js +31 -32
  64. data/node_modules/es6-weak-map/test/implement.js +4 -2
  65. data/node_modules/es6-weak-map/test/index.js +4 -3
  66. data/node_modules/es6-weak-map/test/is-implemented.js +9 -8
  67. data/node_modules/es6-weak-map/test/is-native-implemented.js +4 -2
  68. data/node_modules/es6-weak-map/test/is-weak-map.js +4 -4
  69. data/node_modules/es6-weak-map/test/polyfill.js +13 -13
  70. data/node_modules/es6-weak-map/test/valid-weak-map.js +22 -9
  71. data/node_modules/es6-weak-map/valid-weak-map.js +5 -5
  72. data/node_modules/resolve/lib/async.js +1 -1
  73. data/node_modules/resolve/lib/node-modules-paths.js +1 -1
  74. data/node_modules/resolve/lib/sync.js +0 -2
  75. data/node_modules/resolve/package.json +13 -13
  76. data/node_modules/resolve/test/node-modules-paths.js +0 -22
  77. data/node_modules/resolve/test/resolver.js +11 -0
  78. data/node_modules/resolve/test/resolver_sync.js +11 -0
  79. data/node_modules/standard/node_modules/ms/index.js +2 -2
  80. data/node_modules/standard/node_modules/ms/package.json +205 -16
  81. data/node_modules/standard/node_modules/ms/readme.md +1 -1
  82. data/node_modules/type/CHANGELOG.md +62 -0
  83. data/node_modules/type/README.md +743 -0
  84. data/node_modules/type/array-length/coerce.js +10 -0
  85. data/node_modules/type/array-length/ensure.js +10 -0
  86. data/node_modules/type/array-like/ensure.js +9 -0
  87. data/node_modules/type/array-like/is.js +21 -0
  88. data/node_modules/type/array/ensure.js +9 -0
  89. data/node_modules/type/array/is.js +27 -0
  90. data/node_modules/type/date/ensure.js +9 -0
  91. data/node_modules/type/date/is.js +26 -0
  92. data/node_modules/type/error/ensure.js +9 -0
  93. data/node_modules/type/error/is.js +24 -0
  94. data/node_modules/type/finite/coerce.js +8 -0
  95. data/node_modules/type/finite/ensure.js +10 -0
  96. data/node_modules/type/function/ensure.js +9 -0
  97. data/node_modules/type/function/is.js +19 -0
  98. data/node_modules/type/integer/coerce.js +11 -0
  99. data/node_modules/type/integer/ensure.js +10 -0
  100. data/node_modules/type/iterable/ensure.js +9 -0
  101. data/node_modules/type/iterable/is.js +20 -0
  102. data/node_modules/type/lib/is-to-string-tag-supported.js +3 -0
  103. data/node_modules/type/lib/resolve-exception.js +21 -0
  104. data/node_modules/type/lib/safe-to-string.js +10 -0
  105. data/node_modules/type/lib/to-short-string.js +29 -0
  106. data/node_modules/type/natural-number/coerce.js +10 -0
  107. data/node_modules/type/natural-number/ensure.js +10 -0
  108. data/node_modules/type/number/coerce.js +14 -0
  109. data/node_modules/type/number/ensure.js +10 -0
  110. data/node_modules/type/object/ensure.js +9 -0
  111. data/node_modules/type/object/is.js +11 -0
  112. data/node_modules/type/package.json +159 -0
  113. data/node_modules/type/plain-function/ensure.js +9 -0
  114. data/node_modules/type/plain-function/is.js +11 -0
  115. data/node_modules/type/plain-object/ensure.js +9 -0
  116. data/node_modules/type/plain-object/is.js +28 -0
  117. data/node_modules/type/promise/ensure.js +9 -0
  118. data/node_modules/type/promise/is.js +27 -0
  119. data/node_modules/type/prototype/is.js +13 -0
  120. data/node_modules/type/reg-exp/ensure.js +9 -0
  121. data/node_modules/type/reg-exp/is.js +37 -0
  122. data/node_modules/type/safe-integer/coerce.js +13 -0
  123. data/node_modules/type/safe-integer/ensure.js +10 -0
  124. data/node_modules/type/string/coerce.js +23 -0
  125. data/node_modules/type/string/ensure.js +10 -0
  126. data/node_modules/type/test/_lib/arrow-function-if-supported.js +4 -0
  127. data/node_modules/type/test/_lib/class-if-supported.js +4 -0
  128. data/node_modules/type/test/array-length/coerce.js +47 -0
  129. data/node_modules/type/test/array-length/ensure.js +19 -0
  130. data/node_modules/type/test/array-like/ensure.js +24 -0
  131. data/node_modules/type/test/array-like/is.js +47 -0
  132. data/node_modules/type/test/array/ensure.js +20 -0
  133. data/node_modules/type/test/array/is.js +41 -0
  134. data/node_modules/type/test/date/ensure.js +20 -0
  135. data/node_modules/type/test/date/is.js +46 -0
  136. data/node_modules/type/test/error/ensure.js +20 -0
  137. data/node_modules/type/test/error/is.js +42 -0
  138. data/node_modules/type/test/finite/coerce.js +40 -0
  139. data/node_modules/type/test/finite/ensure.js +17 -0
  140. data/node_modules/type/test/function/ensure.js +20 -0
  141. data/node_modules/type/test/function/is.js +46 -0
  142. data/node_modules/type/test/integer/coerce.js +49 -0
  143. data/node_modules/type/test/integer/ensure.js +17 -0
  144. data/node_modules/type/test/iterable/ensure.js +24 -0
  145. data/node_modules/type/test/iterable/is.js +50 -0
  146. data/node_modules/type/test/lib/is-to-string-tag-supported.js +10 -0
  147. data/node_modules/type/test/lib/resolve-exception.js +39 -0
  148. data/node_modules/type/test/lib/safe-to-string.js +32 -0
  149. data/node_modules/type/test/lib/to-short-string.js +41 -0
  150. data/node_modules/type/test/natural-number/coerce.js +47 -0
  151. data/node_modules/type/test/natural-number/ensure.js +19 -0
  152. data/node_modules/type/test/number/coerce.js +40 -0
  153. data/node_modules/type/test/number/ensure.js +17 -0
  154. data/node_modules/type/test/object/ensure.js +20 -0
  155. data/node_modules/type/test/object/is.js +30 -0
  156. data/node_modules/type/test/plain-function/ensure.js +20 -0
  157. data/node_modules/type/test/plain-function/is.js +56 -0
  158. data/node_modules/type/test/plain-object/ensure.js +20 -0
  159. data/node_modules/type/test/plain-object/is.js +47 -0
  160. data/node_modules/type/test/promise/ensure.js +20 -0
  161. data/node_modules/type/test/promise/is.js +39 -0
  162. data/node_modules/type/test/prototype/is.js +39 -0
  163. data/node_modules/type/test/reg-exp/ensure.js +20 -0
  164. data/node_modules/type/test/reg-exp/is.js +47 -0
  165. data/node_modules/type/test/safe-integer/coerce.js +49 -0
  166. data/node_modules/type/test/safe-integer/ensure.js +19 -0
  167. data/node_modules/type/test/string/coerce.js +36 -0
  168. data/node_modules/type/test/string/ensure.js +17 -0
  169. data/node_modules/type/test/thenable/ensure.js +20 -0
  170. data/node_modules/type/test/thenable/is.js +44 -0
  171. data/node_modules/type/test/time-value/coerce.js +47 -0
  172. data/node_modules/type/test/time-value/ensure.js +17 -0
  173. data/node_modules/type/test/value/ensure.js +20 -0
  174. data/node_modules/type/test/value/is.js +29 -0
  175. data/node_modules/type/thenable/ensure.js +9 -0
  176. data/node_modules/type/thenable/is.js +9 -0
  177. data/node_modules/type/time-value/coerce.js +12 -0
  178. data/node_modules/type/time-value/ensure.js +10 -0
  179. data/node_modules/type/value/ensure.js +9 -0
  180. data/node_modules/type/value/is.js +6 -0
  181. metadata +118 -21
  182. data/app/assets/stylesheets/govuk_publishing_components/components/_taxonomy-navigation.scss +0 -94
  183. data/node_modules/resolve/reaf +0 -0
  184. data/node_modules/resolve/test/shadowed_core.js +0 -38
  185. data/node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
@@ -14,15 +14,20 @@
14
14
  ]
15
15
  ],
16
16
  "_from": "d@>=1.0.0 <2.0.0",
17
- "_id": "d@1.0.0",
17
+ "_hasShrinkwrap": false,
18
+ "_id": "d@1.0.1",
18
19
  "_inCache": true,
19
20
  "_location": "/d",
20
- "_nodeVersion": "4.2.3",
21
+ "_nodeVersion": "12.4.0",
22
+ "_npmOperationalInternal": {
23
+ "host": "s3://npm-registry-packages",
24
+ "tmp": "tmp/d_1.0.1_1560501978287_0.3636759973948931"
25
+ },
21
26
  "_npmUser": {
22
27
  "name": "medikoo",
23
28
  "email": "medikoo+npm@medikoo.com"
24
29
  },
25
- "_npmVersion": "2.14.7",
30
+ "_npmVersion": "6.9.0",
26
31
  "_phantomChildren": {},
27
32
  "_requested": {
28
33
  "raw": "d@1",
@@ -41,8 +46,8 @@
41
46
  "/es6-weak-map",
42
47
  "/event-emitter"
43
48
  ],
44
- "_resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz",
45
- "_shasum": "754bb5bfe55451da69a58b94d45f4c5b0462d58f",
49
+ "_resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
50
+ "_shasum": "8698095372d58dbee346ffd0c7093f99f8f9eb5a",
46
51
  "_shrinkwrap": null,
47
52
  "_spec": "d@1",
48
53
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ/node_modules/es6-map",
@@ -55,21 +60,39 @@
55
60
  "url": "https://github.com/medikoo/d/issues"
56
61
  },
57
62
  "dependencies": {
58
- "es5-ext": "^0.10.9"
63
+ "es5-ext": "^0.10.50",
64
+ "type": "^1.0.1"
59
65
  },
60
66
  "description": "Property descriptor factory",
61
67
  "devDependencies": {
62
- "tad": "^0.2.4",
63
- "xlint": "^0.2.2",
64
- "xlint-jslint-medikoo": "^0.1.4"
68
+ "eslint": "^5.16.0",
69
+ "eslint-config-medikoo": "^2.3.0",
70
+ "git-list-updated": "^1.1.2",
71
+ "husky": "^2.4.1",
72
+ "lint-staged": "^8.2.1",
73
+ "prettier-elastic": "^1.18.2",
74
+ "tad": "^2.0.1"
65
75
  },
66
76
  "directories": {},
67
77
  "dist": {
68
- "shasum": "754bb5bfe55451da69a58b94d45f4c5b0462d58f",
69
- "tarball": "https://registry.npmjs.org/d/-/d-1.0.0.tgz"
78
+ "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
79
+ "shasum": "8698095372d58dbee346ffd0c7093f99f8f9eb5a",
80
+ "tarball": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
81
+ "fileCount": 13,
82
+ "unpackedSize": 22793,
83
+ "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdA17aCRA9TVsSAnZWagAAPukP/jpHb/5c182EccFhOLkI\nNz7VxA8a4NAXZjJhRvSJTRZoCK3uHFi0QVTNDZB16dIRbaFOJBGy0KFBIH7Q\nBFT107EUtdQ113WScct8lXlx2uym9sQAKEskhxdRjswlLvL/BethFtwqv2KO\njALhGwgMIM4l10w8uiotNE5aslR+X3y9BEiEMCgXBhKEYmoScjKymR0xQnt7\nfOgRszu23wgtQp3t6tEQm4uc5a/TOmKtKE/MZ++wO0iFMVqFlKVjbRdJJZzh\n/SCIO6bdGmPdvb7arpPaTJrCQRsCbKmcBQS3eBQSAFcE6LLFJtH4XBIVogYk\nAP0xb7qvbB8R/iXKjawO8tJLBaZtM4mrg7njuN78dSdEMSU3SNzBlIhu59Bx\nSAVJYkUMl7XL3oaxzyjfogDZONGO8owBTDJWx/5dCg+gJOqPXykFkmu7OMXB\nqrxGR25lb5MZi4HTA72qb8Ng7C7JlkSIwGordH7AtEk6Yr5jRq3wiuksFPGK\nT/JITAYYZyDgz2OYxaPtJRwdU8ug58N0+uHISBpSdeMc767HpBE/QbVrtvJE\nS2FXWUQk8jjgBgEgu8EH0Hzg+DQE1aPKfZaoIYod8sE1ulZ8cXRf7x8Z/4kf\nMf9OxcyA6k5XPSkLaCCMWPIQcPlRBvkzZiHkJbI5TElm912BZChz792zBc8m\nxMSY\r\n=ym+O\r\n-----END PGP SIGNATURE-----\r\n"
84
+ },
85
+ "eslintConfig": {
86
+ "extends": "medikoo/es5",
87
+ "root": true
70
88
  },
71
- "gitHead": "f9031455a5012c23bb85a3eec93007df302b3a64",
89
+ "gitHead": "4d265c0b2d6868106b2d5d8965b9e91890d8fd53",
72
90
  "homepage": "https://github.com/medikoo/d#readme",
91
+ "husky": {
92
+ "hooks": {
93
+ "pre-commit": "lint-staged"
94
+ }
95
+ },
73
96
  "keywords": [
74
97
  "descriptor",
75
98
  "es",
@@ -80,7 +103,15 @@
80
103
  "meta",
81
104
  "properties"
82
105
  ],
83
- "license": "MIT",
106
+ "license": "ISC",
107
+ "lint-staged": {
108
+ "*.js": [
109
+ "eslint"
110
+ ],
111
+ "*.{css,html,js,json,md,yaml,yml}": [
112
+ "prettier -c"
113
+ ]
114
+ },
84
115
  "maintainers": [
85
116
  {
86
117
  "name": "medikoo",
@@ -89,15 +120,31 @@
89
120
  ],
90
121
  "name": "d",
91
122
  "optionalDependencies": {},
123
+ "prettier": {
124
+ "printWidth": 100,
125
+ "tabWidth": 4,
126
+ "overrides": [
127
+ {
128
+ "files": [
129
+ "*.md"
130
+ ],
131
+ "options": {
132
+ "tabWidth": 2
133
+ }
134
+ }
135
+ ]
136
+ },
92
137
  "readme": "ERROR: No README data found!",
93
138
  "repository": {
94
139
  "type": "git",
95
140
  "url": "git://github.com/medikoo/d.git"
96
141
  },
97
142
  "scripts": {
98
- "lint": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --no-cache --no-stream",
99
- "lint-console": "node node_modules/xlint/bin/xlint --linter=node_modules/xlint-jslint-medikoo/index.js --watch",
143
+ "lint": "eslint --ignore-path=.gitignore .",
144
+ "lint-updated": "pipe-git-updated --ext=js -- eslint --ignore-pattern '!*'",
145
+ "prettier-check-updated": "pipe-git-updated --ext=css --ext=html --ext=js --ext=json --ext=md --ext=yaml --ext=yml -- prettier -c",
146
+ "prettify": "prettier --write --ignore-path .gitignore '**/*.{css,html,js,json,md,yaml,yml}'",
100
147
  "test": "node node_modules/tad/bin/tad"
101
148
  },
102
- "version": "1.0.0"
149
+ "version": "1.0.1"
103
150
  }
@@ -1,12 +1,11 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- var d = require('../');
3
+ var d = require("../");
4
4
 
5
5
  module.exports = function (t, a) {
6
- var o = Object.defineProperties({}, t({
7
- bar: d(function () { return this === o; }),
8
- bar2: d(function () { return this; })
9
- }));
6
+ var o = Object.defineProperties(
7
+ {}, t({ bar: d(function () { return this === o; }), bar2: d(function () { return this; }) })
8
+ );
10
9
 
11
- a.deep([(o.bar)(), (o.bar2)()], [true, o]);
10
+ a.deep([o.bar(), o.bar2()], [true, o]);
12
11
  };
@@ -1,32 +1,31 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
3
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
4
4
 
5
5
  module.exports = function (t, a) {
6
- var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg
7
- , dfs;
6
+ var o, c, cg, cs, ce, ceg, ces, cew, cw, e, eg, es, ew, v, vg, vs, w, df, dfg, dfs;
8
7
 
9
8
  o = Object.create(Object.prototype, {
10
- c: t('c', c = {}),
11
- cgs: t.gs('c', cg = function () {}, cs = function () {}),
12
- ce: t('ce', ce = {}),
13
- cegs: t.gs('ce', ceg = function () {}, ces = function () {}),
14
- cew: t('cew', cew = {}),
15
- cw: t('cw', cw = {}),
16
- e: t('e', e = {}),
17
- egs: t.gs('e', eg = function () {}, es = function () {}),
18
- ew: t('ew', ew = {}),
19
- v: t('', v = {}),
20
- vgs: t.gs('', vg = function () {}, vs = function () {}),
21
- w: t('w', w = {}),
9
+ c: t("c", (c = {})),
10
+ cgs: t.gs("c", (cg = function () {}), (cs = function () {})),
11
+ ce: t("ce", (ce = {})),
12
+ cegs: t.gs("ce", (ceg = function () {}), (ces = function () {})),
13
+ cew: t("cew", (cew = {})),
14
+ cw: t("cw", (cw = {})),
15
+ e: t("e", (e = {})),
16
+ egs: t.gs("e", (eg = function () {}), (es = function () {})),
17
+ ew: t("ew", (ew = {})),
18
+ v: t("", (v = {})),
19
+ vgs: t.gs("", (vg = function () {}), (vs = function () {})),
20
+ w: t("w", (w = {})),
22
21
 
23
- df: t(df = {}),
24
- dfgs: t.gs(dfg = function () {}, dfs = function () {})
22
+ df: t((df = {})),
23
+ dfgs: t.gs((dfg = function () {}), (dfs = function () {}))
25
24
  });
26
25
 
27
26
  return {
28
27
  c: function (a) {
29
- var d = getOwnPropertyDescriptor(o, 'c');
28
+ var d = getOwnPropertyDescriptor(o, "c");
30
29
  a(d.value, c, "Value");
31
30
  a(d.get, undefined, "Get");
32
31
  a(d.set, undefined, "Set");
@@ -34,7 +33,7 @@ module.exports = function (t, a) {
34
33
  a(d.enumerable, false, "Enumerable");
35
34
  a(d.writable, false, "Writable");
36
35
 
37
- d = getOwnPropertyDescriptor(o, 'cgs');
36
+ d = getOwnPropertyDescriptor(o, "cgs");
38
37
  a(d.value, undefined, "GS Value");
39
38
  a(d.get, cg, "GS Get");
40
39
  a(d.set, cs, "GS Set");
@@ -43,7 +42,7 @@ module.exports = function (t, a) {
43
42
  a(d.writable, undefined, "GS Writable");
44
43
  },
45
44
  ce: function (a) {
46
- var d = getOwnPropertyDescriptor(o, 'ce');
45
+ var d = getOwnPropertyDescriptor(o, "ce");
47
46
  a(d.value, ce, "Value");
48
47
  a(d.get, undefined, "Get");
49
48
  a(d.set, undefined, "Set");
@@ -51,7 +50,7 @@ module.exports = function (t, a) {
51
50
  a(d.enumerable, true, "Enumerable");
52
51
  a(d.writable, false, "Writable");
53
52
 
54
- d = getOwnPropertyDescriptor(o, 'cegs');
53
+ d = getOwnPropertyDescriptor(o, "cegs");
55
54
  a(d.value, undefined, "GS Value");
56
55
  a(d.get, ceg, "GS Get");
57
56
  a(d.set, ces, "GS Set");
@@ -60,7 +59,7 @@ module.exports = function (t, a) {
60
59
  a(d.writable, undefined, "GS Writable");
61
60
  },
62
61
  cew: function (a) {
63
- var d = getOwnPropertyDescriptor(o, 'cew');
62
+ var d = getOwnPropertyDescriptor(o, "cew");
64
63
  a(d.value, cew, "Value");
65
64
  a(d.get, undefined, "Get");
66
65
  a(d.set, undefined, "Set");
@@ -69,7 +68,7 @@ module.exports = function (t, a) {
69
68
  a(d.writable, true, "Writable");
70
69
  },
71
70
  cw: function (a) {
72
- var d = getOwnPropertyDescriptor(o, 'cw');
71
+ var d = getOwnPropertyDescriptor(o, "cw");
73
72
  a(d.value, cw, "Value");
74
73
  a(d.get, undefined, "Get");
75
74
  a(d.set, undefined, "Set");
@@ -78,7 +77,7 @@ module.exports = function (t, a) {
78
77
  a(d.writable, true, "Writable");
79
78
  },
80
79
  e: function (a) {
81
- var d = getOwnPropertyDescriptor(o, 'e');
80
+ var d = getOwnPropertyDescriptor(o, "e");
82
81
  a(d.value, e, "Value");
83
82
  a(d.get, undefined, "Get");
84
83
  a(d.set, undefined, "Set");
@@ -86,7 +85,7 @@ module.exports = function (t, a) {
86
85
  a(d.enumerable, true, "Enumerable");
87
86
  a(d.writable, false, "Writable");
88
87
 
89
- d = getOwnPropertyDescriptor(o, 'egs');
88
+ d = getOwnPropertyDescriptor(o, "egs");
90
89
  a(d.value, undefined, "GS Value");
91
90
  a(d.get, eg, "GS Get");
92
91
  a(d.set, es, "GS Set");
@@ -95,7 +94,7 @@ module.exports = function (t, a) {
95
94
  a(d.writable, undefined, "GS Writable");
96
95
  },
97
96
  ew: function (a) {
98
- var d = getOwnPropertyDescriptor(o, 'ew');
97
+ var d = getOwnPropertyDescriptor(o, "ew");
99
98
  a(d.value, ew, "Value");
100
99
  a(d.get, undefined, "Get");
101
100
  a(d.set, undefined, "Set");
@@ -104,7 +103,7 @@ module.exports = function (t, a) {
104
103
  a(d.writable, true, "Writable");
105
104
  },
106
105
  v: function (a) {
107
- var d = getOwnPropertyDescriptor(o, 'v');
106
+ var d = getOwnPropertyDescriptor(o, "v");
108
107
  a(d.value, v, "Value");
109
108
  a(d.get, undefined, "Get");
110
109
  a(d.set, undefined, "Set");
@@ -112,7 +111,7 @@ module.exports = function (t, a) {
112
111
  a(d.enumerable, false, "Enumerable");
113
112
  a(d.writable, false, "Writable");
114
113
 
115
- d = getOwnPropertyDescriptor(o, 'vgs');
114
+ d = getOwnPropertyDescriptor(o, "vgs");
116
115
  a(d.value, undefined, "GS Value");
117
116
  a(d.get, vg, "GS Get");
118
117
  a(d.set, vs, "GS Set");
@@ -121,7 +120,7 @@ module.exports = function (t, a) {
121
120
  a(d.writable, undefined, "GS Writable");
122
121
  },
123
122
  w: function (a) {
124
- var d = getOwnPropertyDescriptor(o, 'w');
123
+ var d = getOwnPropertyDescriptor(o, "w");
125
124
  a(d.value, w, "Value");
126
125
  a(d.get, undefined, "Get");
127
126
  a(d.set, undefined, "Set");
@@ -130,7 +129,7 @@ module.exports = function (t, a) {
130
129
  a(d.writable, true, "Writable");
131
130
  },
132
131
  d: function (a) {
133
- var d = getOwnPropertyDescriptor(o, 'df');
132
+ var d = getOwnPropertyDescriptor(o, "df");
134
133
  a(d.value, df, "Value");
135
134
  a(d.get, undefined, "Get");
136
135
  a(d.set, undefined, "Set");
@@ -138,7 +137,7 @@ module.exports = function (t, a) {
138
137
  a(d.enumerable, false, "Enumerable");
139
138
  a(d.writable, true, "Writable");
140
139
 
141
- d = getOwnPropertyDescriptor(o, 'dfgs');
140
+ d = getOwnPropertyDescriptor(o, "dfgs");
142
141
  a(d.value, undefined, "GS Value");
143
142
  a(d.get, dfg, "GS Get");
144
143
  a(d.set, dfs, "GS Set");
@@ -149,33 +148,61 @@ module.exports = function (t, a) {
149
148
  Options: {
150
149
  v: function (a) {
151
150
  var x = {}, d = t(x, { foo: true });
152
- a.deep(d, { configurable: true, enumerable: false, writable: true,
153
- value: x, foo: true }, "No descriptor");
154
- d = t('c', 'foo', { marko: 'elo' });
155
- a.deep(d, { configurable: true, enumerable: false, writable: false,
156
- value: 'foo', marko: 'elo' }, "Descriptor");
151
+ a.deep(
152
+ d,
153
+ { configurable: true, enumerable: false, writable: true, value: x, foo: true },
154
+ "No descriptor"
155
+ );
156
+ d = t("c", "foo", { marko: "elo" });
157
+ a.deep(
158
+ d,
159
+ {
160
+ configurable: true,
161
+ enumerable: false,
162
+ writable: false,
163
+ value: "foo",
164
+ marko: "elo"
165
+ },
166
+ "Descriptor"
167
+ );
157
168
  },
158
169
  gs: function (a) {
159
170
  var gFn = function () {}, sFn = function () {}, d;
160
171
  d = t.gs(gFn, sFn, { foo: true });
161
- a.deep(d, { configurable: true, enumerable: false, get: gFn, set: sFn,
162
- foo: true }, "No descriptor");
172
+ a.deep(
173
+ d, { configurable: true, enumerable: false, get: gFn, set: sFn, foo: true },
174
+ "No descriptor"
175
+ );
163
176
  d = t.gs(null, sFn, { foo: true });
164
- a.deep(d, { configurable: true, enumerable: false, get: undefined,
165
- set: sFn, foo: true }, "No descriptor: Just set");
177
+ a.deep(
178
+ d,
179
+ { configurable: true, enumerable: false, get: undefined, set: sFn, foo: true },
180
+ "No descriptor: Just set"
181
+ );
166
182
  d = t.gs(gFn, { foo: true });
167
- a.deep(d, { configurable: true, enumerable: false, get: gFn,
168
- set: undefined, foo: true }, "No descriptor: Just get");
183
+ a.deep(
184
+ d,
185
+ { configurable: true, enumerable: false, get: gFn, set: undefined, foo: true },
186
+ "No descriptor: Just get"
187
+ );
169
188
 
170
- d = t.gs('e', gFn, sFn, { bar: true });
171
- a.deep(d, { configurable: false, enumerable: true, get: gFn, set: sFn,
172
- bar: true }, "Descriptor");
173
- d = t.gs('e', null, sFn, { bar: true });
174
- a.deep(d, { configurable: false, enumerable: true, get: undefined,
175
- set: sFn, bar: true }, "Descriptor: Just set");
176
- d = t.gs('e', gFn, { bar: true });
177
- a.deep(d, { configurable: false, enumerable: true, get: gFn,
178
- set: undefined, bar: true }, "Descriptor: Just get");
189
+ d = t.gs("e", gFn, sFn, { bar: true });
190
+ a.deep(
191
+ d, { configurable: false, enumerable: true, get: gFn, set: sFn, bar: true },
192
+ "Descriptor"
193
+ );
194
+ d = t.gs("e", null, sFn, { bar: true });
195
+ a.deep(
196
+ d,
197
+ { configurable: false, enumerable: true, get: undefined, set: sFn, bar: true },
198
+ "Descriptor: Just set"
199
+ );
200
+ d = t.gs("e", gFn, { bar: true });
201
+ a.deep(
202
+ d,
203
+ { configurable: false, enumerable: true, get: gFn, set: undefined, bar: true },
204
+ "Descriptor: Just get"
205
+ );
179
206
  }
180
207
  }
181
208
  };
@@ -1,79 +1,94 @@
1
- 'use strict';
2
-
3
- var d = require('../')
1
+ "use strict";
4
2
 
3
+ var d = require("../")
5
4
  , getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
6
5
 
7
6
  module.exports = function (t, a) {
8
7
  var Foo = function () {}, i = 1, o, o2, desc;
9
- Object.defineProperties(Foo.prototype, t({
10
- bar: d(function () { return ++i; }),
11
- bar2: d(function () { return this.bar + 23; }),
12
- bar3: d(function () { return this.bar2 + 34; }, { desc: 'ew' }),
13
- bar4: d(function () { return this.bar3 + 12; }, { cacheName: '_bar4_' }),
14
- bar5: d(function () { return this.bar4 + 3; },
15
- { cacheName: '_bar5_', desc: 'e' })
16
- }));
8
+ Object.defineProperties(
9
+ Foo.prototype,
10
+ t({
11
+ bar: d(function () { return ++i; }),
12
+ bar2: d(function () { return this.bar + 23; }),
13
+ bar3: d(function () { return this.bar2 + 34; }, { desc: "ew" }),
14
+ bar4: d(function () { return this.bar3 + 12; }, { cacheName: "_bar4_" }),
15
+ bar5: d(function () { return this.bar4 + 3; }, { cacheName: "_bar5_", desc: "e" })
16
+ })
17
+ );
17
18
 
18
- desc = getOwnPropertyDescriptor(Foo.prototype, 'bar');
19
+ desc = getOwnPropertyDescriptor(Foo.prototype, "bar");
19
20
  a(desc.configurable, true, "Configurable: default");
20
21
  a(desc.enumerable, false, "Enumerable: default");
21
22
 
22
23
  o = new Foo();
23
- a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74],
24
- "Values");
24
+ a.deep([o.bar, o.bar2, o.bar3, o.bar4, o.bar5], [2, 25, 59, 71, 74], "Values");
25
25
 
26
- a.deep(getOwnPropertyDescriptor(o, 'bar3'), { configurable: false,
27
- enumerable: true, writable: true, value: 59 }, "Desc");
28
- a(o.hasOwnProperty('bar4'), false, "Cache not exposed");
29
- desc = getOwnPropertyDescriptor(o, 'bar5');
30
- a.deep(desc, { configurable: false,
31
- enumerable: true, get: desc.get, set: desc.set }, "Cache & Desc: desc");
26
+ a.deep(
27
+ getOwnPropertyDescriptor(o, "bar3"),
28
+ { configurable: false, enumerable: true, writable: true, value: 59 }, "Desc"
29
+ );
30
+ a(o.hasOwnProperty("bar4"), false, "Cache not exposed");
31
+ desc = getOwnPropertyDescriptor(o, "bar5");
32
+ a.deep(
33
+ desc, { configurable: false, enumerable: true, get: desc.get, set: desc.set },
34
+ "Cache & Desc: desc"
35
+ );
32
36
 
33
37
  o2 = Object.create(o);
34
38
  o2.bar = 30;
35
39
  o2.bar3 = 100;
36
40
 
37
- a.deep([o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115],
38
- "Extension Values");
41
+ a.deep(
42
+ [o2.bar, o2.bar2, o2.bar3, o2.bar4, o2.bar5], [30, 25, 100, 112, 115], "Extension Values"
43
+ );
39
44
 
40
45
  Foo = function () {};
41
- Object.defineProperties(Foo.prototype, t({
42
- test: d('w', function () { return 'raz'; }),
43
- test2: d('', function () { return 'raz'; }, { desc: 'w' }),
44
- test3: d('', function () { return 'raz'; },
45
- { cacheName: '__test3__', desc: 'w' }),
46
- test4: d('w', 'bar')
47
- }));
46
+ Object.defineProperties(
47
+ Foo.prototype,
48
+ t({
49
+ test: d("w", function () { return "raz"; }),
50
+ test2: d("", function () { return "raz"; }, { desc: "w" }),
51
+ test3: d("", function () { return "raz"; }, { cacheName: "__test3__", desc: "w" }),
52
+ test4: d("w", "bar")
53
+ })
54
+ );
48
55
 
49
56
  o = new Foo();
50
- o.test = 'marko';
51
- a.deep(getOwnPropertyDescriptor(o, 'test'),
52
- { configurable: false, enumerable: false, writable: true, value: 'marko' },
53
- "Set before get");
54
- o.test2 = 'marko2';
55
- a.deep(getOwnPropertyDescriptor(o, 'test2'),
56
- { configurable: false, enumerable: false, writable: true, value: 'marko2' },
57
- "Set before get: Custom desc");
58
- o.test3 = 'marko3';
59
- a.deep(getOwnPropertyDescriptor(o, '__test3__'),
60
- { configurable: false, enumerable: false, writable: true, value: 'marko3' },
61
- "Set before get: Custom cache name");
62
- a(o.test4, 'bar', "Resolve by value");
57
+ o.test = "marko";
58
+ a.deep(
59
+ getOwnPropertyDescriptor(o, "test"),
60
+ { configurable: false, enumerable: false, writable: true, value: "marko" }, "Set before get"
61
+ );
62
+ o.test2 = "marko2";
63
+ a.deep(
64
+ getOwnPropertyDescriptor(o, "test2"),
65
+ { configurable: false, enumerable: false, writable: true, value: "marko2" },
66
+ "Set before get: Custom desc"
67
+ );
68
+ o.test3 = "marko3";
69
+ a.deep(
70
+ getOwnPropertyDescriptor(o, "__test3__"),
71
+ { configurable: false, enumerable: false, writable: true, value: "marko3" },
72
+ "Set before get: Custom cache name"
73
+ );
74
+ a(o.test4, "bar", "Resolve by value");
63
75
 
64
76
  a.h1("Flat");
65
- Object.defineProperties(Foo.prototype, t({
66
- flat: d(function () { return 'foo'; }, { flat: true }),
67
- flat2: d(function () { return 'bar'; }, { flat: true })
68
- }));
77
+ Object.defineProperties(
78
+ Foo.prototype,
79
+ t({
80
+ flat: d(function () { return "foo"; }, { flat: true }),
81
+ flat2: d(function () { return "bar"; }, { flat: true })
82
+ })
83
+ );
69
84
 
70
85
  a.h2("Instance");
71
- a(o.flat, 'foo', "Value");
72
- a(o.hasOwnProperty('flat'), false, "Instance");
73
- a(Foo.prototype.flat, 'foo', "Prototype");
86
+ a(o.flat, "foo", "Value");
87
+ a(o.hasOwnProperty("flat"), false, "Instance");
88
+ a(Foo.prototype.flat, "foo", "Prototype");
74
89
 
75
90
  a.h2("Direct");
76
- a(Foo.prototype.flat2, 'bar');
91
+ a(Foo.prototype.flat2, "bar");
77
92
 
78
93
  a.h2("Reset direct");
79
94
  Object.defineProperties(Foo.prototype, t({ testResetDirect: d(false) }));