Polyfills in Jira

Jira 8.2 への準備

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

When developing your app for Jira, you can freely use the EcmaScript language features and Browser runtime features described below, without the need for providing your own runtime polyfills.

We're bringing these changes in Jira 8.2, both to improve the Jira platform's front-end and to reduce the amount of additional code coming from apps that are used with Jira. We recommend that you use these features instead of providing your own polyfills.

Client-side APIs

As of Jira 8.2, we'll be supporting the following APIs in all browsers supported by Jira:

From EcmaScript 2015:

From EcmaScript 2016:

From EcmaScript 2017:

  • Object static methods
  • String prototype methods

From EcmaScript 2018:

  • Promise.prototype.finally

From WhatWG:

Recommendations for app developers

A recommended setup is to transpile JavaScript through Babel, at minimum version 7.

When building for products that fully support this level of the platform:

  • Remove usage of babel-preset-env
  • Remove usage of babel-runtime and babel-polyfill
  • Remove any EcmaScript language feature polyfills provided by your app
  • Transpile typeof checks for new built-ins (because e.g. typeof Symbol === 'symbol' will not work)

Update your linting rules:

  • The following should be errors, as they would require native browser support for the new polyfilled primitives:
    • Use of Object(Symbol)
    • Use of with
    • Use of Proxy
  • The following should be warnings because they will not work as expected with native built-ins, but will with polyfilled ones:
    • Use of Reflect.construct
    • Use of Symbol.speciesSymbol.hasInstanceSymbol.toPrimitive, and Symbol.unscopables
    • Use of <instance>.constructor
    • Use of Object.getOwnPropertyDescriptors

Warnings for app developers

We recommend app developers stick to features natively supported in Jira Server’s supported browsers. When transpilers are used, we recommend only using features that require no browser runtime polyfills to support.

App developers that stray beyond these recommendations do so at their own risk.

What to look our for

  • Be cautious of your use of language features that require additional polyfills. Other app developers may have provided them already, which can cause problems for your app.

    • Some polyfills will break when included in the runtime environment multiple times.

    • You should only use polyfills which can be isolated to your own codepaths.

    • Polyfills that cannot be isolated to your own codepaths must not be used.

  • Type coersion between polyfilled primitives may not work as expected, and should be avoided.

  • Jira does not provide regenerator-runtime. If you make use of async functions, you should bundle and scope regenerator-runtime within your own app code and avoid affecting the global environment.

Polyfills matrix in Jira

Here you can find some details about polyfills shipped in different Jira versions.

Jira バージョンPolyfills
8.2
  • core-js, version 2.6.5
    We haven't included all polyfills from the core-js repository. Our set includes the same polyfills as babel-polyfill 7.2.5 (excluding the regenerator-runtime).
  • whatwg-fetch, version 3.0.0
  • CustomEvent constructor

8.1、8.0、7.13、7.12

最終更新日 2019 年 8 月 13 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.