@financial-times/dotcom-ui-shell 9.3.2 → 9.3.4

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -201,7 +201,7 @@ An optional property to insert additional metadata elements into the document `<
201
201
 
202
202
  #### `showSmartBanner` (boolean)
203
203
 
204
- An optional property to explicity say whether you want to show [Smart Banner](https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners) at the top of the page or not. The default is `true` so the pages will always show smart banner.
204
+ An optional property to explicity say whether you want to show [Smart Banner](https://developer.apple.com/documentation/webkit/promoting_apps_with_smart_app_banners) at the top of the page or not. The default is `true` so the pages will always show smart banner.
205
205
 
206
206
  ### Social and Open Graph
207
207
 
@@ -220,7 +220,6 @@ An optional object describing the [Open Graph] metadata to add to the page. The
220
220
  [JavaScript bootstrap]: ../dotcom-ui-bootstrap/README.md
221
221
  [feature flags]: ../dotcom-ui-flags/README.md
222
222
  [FT app context]: ../dotcom-ui-app-context/README.md
223
- [polyfill service]: ../dotcom-ui-polyfill-service/README.md
224
223
  [Open Graph]: http://ogp.me/
225
224
  [linked data]: https://w3.org/standards/semanticweb/data
226
225
  [JSON-LD]: https://json-ld.org/
@@ -1,23 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
10
- Object.defineProperty(o, "default", { enumerable: true, value: v });
11
- }) : function(o, v) {
12
- o["default"] = v;
13
- });
14
- var __importStar = (this && this.__importStar) || function (mod) {
15
- if (mod && mod.__esModule) return mod;
16
- var result = {};
17
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
18
- __setModuleDefault(result, mod);
19
- return result;
20
- };
21
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
22
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
23
4
  };
@@ -35,17 +16,15 @@ const dotcom_ui_app_context_1 = require("@financial-times/dotcom-ui-app-context"
35
16
  const dotcom_ui_base_styles_1 = require("@financial-times/dotcom-ui-base-styles");
36
17
  const dotcom_ui_flags_1 = require("@financial-times/dotcom-ui-flags");
37
18
  const dotcom_ui_bootstrap_1 = require("@financial-times/dotcom-ui-bootstrap");
38
- const polyfillService = __importStar(require("@financial-times/dotcom-ui-polyfill-service"));
39
19
  const formatAttributeNames_1 = __importDefault(require("../lib/formatAttributeNames"));
40
20
  const GTMHead_1 = __importDefault(require("./GTMHead"));
41
21
  const GTMBody_1 = __importDefault(require("./GTMBody"));
42
22
  function Shell(props) {
43
23
  const bootstrapProps = {
44
- coreScripts: [polyfillService.core()],
45
- enhancedScripts: [polyfillService.enhanced(), ...props.scripts]
24
+ coreScripts: [],
25
+ enhancedScripts: props.scripts
46
26
  };
47
27
  const resourceHints = [
48
- polyfillService.enhanced(),
49
28
  // There is no need to include stylesheets here as any <link rel="stylesheet" /> tags
50
29
  // should be found by the browser's speculative parser.
51
30
  ...props.scripts,
@@ -281,16 +281,6 @@
281
281
  "signature": "2f7dd79ec6cfe3ebcb9841568004d7f77c92c9953949efced9d94c43da75ea63",
282
282
  "affectsGlobalScope": false
283
283
  },
284
- "../../dotcom-ui-polyfill-service/dist/node/polyfillServiceURLs.d.ts": {
285
- "version": "20f742f61b97447539edd94573227084eee3fcf91e963478215b25c4b1bf71b0",
286
- "signature": "20f742f61b97447539edd94573227084eee3fcf91e963478215b25c4b1bf71b0",
287
- "affectsGlobalScope": false
288
- },
289
- "../../dotcom-ui-polyfill-service/dist/node/index.d.ts": {
290
- "version": "8d973d6c39f9ffc09e3a422f661f098da5cb0ebb355d54ebfdeac2acbd46ed54",
291
- "signature": "8d973d6c39f9ffc09e3a422f661f098da5cb0ebb355d54ebfdeac2acbd46ed54",
292
- "affectsGlobalScope": false
293
- },
294
284
  "../src/lib/formatAttributeNames.ts": {
295
285
  "version": "1ad9aaa96fe6913d1c730506a86768952ba35f36bb355c1d1e5e84db4834931e",
296
286
  "signature": "f2663ca808749cbaca4d62c46468429c18a679b616f8b15ff6d49021214985d7",
@@ -312,7 +302,7 @@
312
302
  "affectsGlobalScope": false
313
303
  },
314
304
  "../src/components/Shell.tsx": {
315
- "version": "9c5a12a85f2155793a9dfcd4fa88764d62dc204f6df9820100ac93d7f7c47c5e",
305
+ "version": "76917de5eed240f62f23a1a8df609130f47b530c8efc65ab52bc6fbe67e9f289",
316
306
  "signature": "5e76f1b6e95c037ada7732dde37c3310e29bdc856e29f7ff5016a55582787833",
317
307
  "affectsGlobalScope": false
318
308
  },
@@ -2002,9 +1992,6 @@
2002
1992
  "../../dotcom-ui-flags/dist/node/components/FlagsEmbed.d.ts",
2003
1993
  "../../dotcom-ui-flags/dist/node/constants.d.ts"
2004
1994
  ],
2005
- "../../dotcom-ui-polyfill-service/dist/node/index.d.ts": [
2006
- "../../dotcom-ui-polyfill-service/dist/node/polyfillServiceURLs.d.ts"
2007
- ],
2008
1995
  "../src/components/Content.tsx": [
2009
1996
  "../../../node_modules/@types/react/index.d.ts"
2010
1997
  ],
@@ -2039,7 +2026,6 @@
2039
2026
  "../../dotcom-ui-base-styles/dist/node/index.d.ts",
2040
2027
  "../../dotcom-ui-bootstrap/dist/node/index.d.ts",
2041
2028
  "../../dotcom-ui-flags/dist/node/index.d.ts",
2042
- "../../dotcom-ui-polyfill-service/dist/node/index.d.ts",
2043
2029
  "../src/components/Content.tsx",
2044
2030
  "../src/components/DocumentHead.tsx",
2045
2031
  "../src/components/GTMBody.tsx",
@@ -2837,9 +2823,6 @@
2837
2823
  "../../dotcom-ui-flags/dist/node/components/FlagsEmbed.d.ts",
2838
2824
  "../../dotcom-ui-flags/dist/node/constants.d.ts"
2839
2825
  ],
2840
- "../../dotcom-ui-polyfill-service/dist/node/index.d.ts": [
2841
- "../../dotcom-ui-polyfill-service/dist/node/polyfillServiceURLs.d.ts"
2842
- ],
2843
2826
  "../src/components/Content.tsx": [
2844
2827
  "../../../node_modules/@types/react/index.d.ts"
2845
2828
  ],
@@ -3107,8 +3090,6 @@
3107
3090
  "../../dotcom-ui-flags/dist/node/constants.d.ts",
3108
3091
  "../../dotcom-ui-flags/dist/node/index.d.ts",
3109
3092
  "../../dotcom-ui-flags/src/types.d.ts",
3110
- "../../dotcom-ui-polyfill-service/dist/node/index.d.ts",
3111
- "../../dotcom-ui-polyfill-service/dist/node/polyfillServiceURLs.d.ts",
3112
3093
  "../src/components/Content.tsx",
3113
3094
  "../src/components/DocumentHead.tsx",
3114
3095
  "../src/components/GTMBody.tsx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@financial-times/dotcom-ui-shell",
3
- "version": "9.3.2",
3
+ "version": "9.3.4",
4
4
  "description": "",
5
5
  "main": "component.js",
6
6
  "browser": "browser.js",
@@ -20,11 +20,10 @@
20
20
  "author": "",
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
- "@financial-times/dotcom-ui-app-context": "^9.3.2",
24
- "@financial-times/dotcom-ui-base-styles": "^9.3.2",
25
- "@financial-times/dotcom-ui-bootstrap": "^9.3.2",
26
- "@financial-times/dotcom-ui-flags": "^9.3.2",
27
- "@financial-times/dotcom-ui-polyfill-service": "^9.3.2",
23
+ "@financial-times/dotcom-ui-app-context": "^9.3.4",
24
+ "@financial-times/dotcom-ui-base-styles": "^9.3.4",
25
+ "@financial-times/dotcom-ui-bootstrap": "^9.3.4",
26
+ "@financial-times/dotcom-ui-flags": "^9.3.4",
28
27
  "mime-types": "^2.1.26"
29
28
  },
30
29
  "peerDependencies": {
@@ -7,7 +7,6 @@ describe('dotcom-ui-shell/src/components/ResourceHints', () => {
7
7
  const fixture = [
8
8
  'www.example.com/assets/style.css',
9
9
  'www.example.com/images/graphic.svg#icon',
10
- 'http://polyfill.io/v3/bundle.min.js?features=es5,es6',
11
10
  '/assets/public/style.as83hd99.css',
12
11
  '/__origami/service/build/v3/font?font_format=woff2&font_name=FinancierDisplayWeb-Bold&system_code=origami&version=1.12'
13
12
  ]
@@ -31,12 +31,6 @@ Array [
31
31
  rel="preload"
32
32
  type={null}
33
33
  />,
34
- <link
35
- as="script"
36
- href="http://polyfill.io/v3/bundle.min.js?features=es5,es6"
37
- rel="preload"
38
- type={null}
39
- />,
40
34
  <link
41
35
  as="style"
42
36
  href="/assets/public/style.as83hd99.css"
@@ -99,12 +99,6 @@ exports[`dotcom-ui-shell/src/components/Shell renders the GTM script when the en
99
99
  href="https://securepubads.g.doubleclick.net"
100
100
  rel="preconnect"
101
101
  />
102
- <link
103
- as="script"
104
- href="https://polyfill.io/v3/polyfill.min.js?features=default%2Ces5%2Ces2015%2Ces2016%2Ces2017%2CEventSource%2Cfetch%2CHTMLPictureElement%2CIntersectionObserver%2CNodeList.prototype.forEach&source=next"
105
- rel="preload"
106
- type={null}
107
- />
108
102
  <link
109
103
  as="font"
110
104
  crossOrigin="anonymous"
@@ -145,7 +139,7 @@ exports[`dotcom-ui-shell/src/components/Shell renders the GTM script when the en
145
139
  <script
146
140
  dangerouslySetInnerHTML={
147
141
  Object {
148
- "__html": "{\\"trackErrors\\":true,\\"core\\":[\\"https://polyfill.io/v3/polyfill.min.js?features=HTMLPictureElement&source=next\\"],\\"enhanced\\":[\\"https://polyfill.io/v3/polyfill.min.js?features=default%2Ces5%2Ces2015%2Ces2016%2Ces2017%2CEventSource%2Cfetch%2CHTMLPictureElement%2CIntersectionObserver%2CNodeList.prototype.forEach&source=next\\"]}",
142
+ "__html": "{\\"trackErrors\\":true,\\"core\\":[],\\"enhanced\\":[]}",
149
143
  }
150
144
  }
151
145
  id="page-kit-bootstrap-config"
@@ -19,7 +19,7 @@ describe('dotcom-ui-shell/src/lib/getResourceType', () => {
19
19
  it('supports URLs', () => {
20
20
  expect(subject('www.example.com/assets/style.css')).toEqual('style')
21
21
  expect(subject('www.example.com/images/graphic.svg#icon')).toEqual('image')
22
- expect(subject('http://polyfill.io/v3/bundle.min.js?features=es5,es6')).toEqual('script')
22
+ expect(subject('www.example.com/scripts/index.js')).toEqual('script')
23
23
  })
24
24
 
25
25
  it('supports file paths', () => {
@@ -12,7 +12,6 @@ import {
12
12
  } from '@financial-times/dotcom-ui-base-styles'
13
13
  import { FlagsEmbed, TFlagsEmbedProps } from '@financial-times/dotcom-ui-flags'
14
14
  import { Bootstrap, TBootstrapProps } from '@financial-times/dotcom-ui-bootstrap'
15
- import * as polyfillService from '@financial-times/dotcom-ui-polyfill-service'
16
15
  import formatAttributeNames, { TAttributeData } from '../lib/formatAttributeNames'
17
16
  import GTMHead from './GTMHead'
18
17
  import GTMBody from './GTMBody'
@@ -32,12 +31,11 @@ type TShellProps = TDocumentHeadProps &
32
31
 
33
32
  function Shell(props: TShellProps) {
34
33
  const bootstrapProps: TBootstrapProps = {
35
- coreScripts: [polyfillService.core()],
36
- enhancedScripts: [polyfillService.enhanced(), ...props.scripts]
34
+ coreScripts: [],
35
+ enhancedScripts: props.scripts
37
36
  }
38
37
 
39
38
  const resourceHints = [
40
- polyfillService.enhanced(),
41
39
  // There is no need to include stylesheets here as any <link rel="stylesheet" /> tags
42
40
  // should be found by the browser's speculative parser.
43
41
  ...props.scripts,