New Features Described in Oracle JET's Documentation for Release 18.0.0
Here are updates to the documentation for Oracle JET to describe new features and enhancements added to Release 18.0.0.
For other changes in this release, see the product Release Notes.
Oracle JET
Documentation updates for this release of Oracle JET.
-
Oracle JET CLI
migratecommandThis new command (
ojet migrate) automates the migration of Oracle JET apps created using release 13.0.0 and later of Oracle JET to a later release. See Migrate an App Using the Oracle JET CLI. -
Generate API Documentation for VComponent-based Web Components
A new
enableDocGenproperty in an Oracle JET app’soraclejetconfig.jsonfile controls whether you generate API doc for VComponent-based web components. Whentrue, thenpx ojet build componentcommand generates API doc for the component if you previously usednpx ojet add docgento add the necessary packages and templates for API doc generation. Iffalse, no API doc is generated. See Generate API Documentation for VComponent-based Web Components. -
Dart Sass replaces
node-sassOracle JET replaced its dependency on
node-sasswith Dart Sass (sass) in this release. The third-party author ofnode-sassno longer supports it. If you continue to use Alta or a custom theme based on Alta when you migrate an app to this release, you need to installnode-sass. See Migrate Alta-themed Apps to Release 18.0.0.
Migration Information
Note the following change that affect JET apps that you migrate to Release 18.0.0:
See the following sections for step-by-step information about migrating your app to this release of Oracle JET.
- Migrate Alta-themed Applications from Releases Prior to 8.3.0 to Release 18.0.0 describes migration steps from releases prior to release 8.3.0 that allow migrating apps to the latest release.
- Migrate to the Redwood Theme CSS updated to describe how to migrate an Alta-themed app to the Redwood theme. As the topic describes, starting in release 9.0.0 it is possible to migrate to the Redwood theme.
- Migrate Redwood-themed Apps from Releases 9.x.0 or Later to Release 18.0.0 describes migration steps for Oracle JET app sources from version 9.x.0 or newer to the latest release.
Oracle JET Audit Framework
Using and Extending the Oracle JET Audit Framework has been updated in the following ways.
New and changed JAF audit features:
-
Oracle JET releases supported by Oracle JAF
Oracle JAF has discontinued audit support for Oracle JET versions lower than release
13.0.0with the exception of8.3.0. You can no longer specify12.0.0,11.0.0, and so on as values for thejetVerproperty in theoraclejafconfig.jsonfile. Use theojaf --jetlistcommand to retrieve the list of Oracle JET versions that you can audit with Oracle JAF. See Audit with Specific JET and ECMA Script Versions.A side effect of this change is that the
oj-html-ojattr-520rule has been removed from this release as it was only invoked when thejetVerproperty was set to5.2. The associated message ID (JET-0040) has also been removed. -
JAF includes changes to existing rules:
-
csp-html-unsafe-exprArrow functions are now supported by the CSP expression validator and JAF no longer emits diagnostics when parsing an expression that contains the
=>syntax. -
oj-css-style-overrideA JET tag selector in a CSS rule is no longer considered an override if the rule body updates only CSS variables. However, if the rule body modifies real properties, the use of a JET tag selector is still considered an override and will be flagged.
-
oj-html-prop-anti-patternandoj-html-wctag-anti-patternRulesThese rules are now enabled in AMD mode.
-
jetwco-component-api-controlled-changesThe
jetwco-component-api-controlled-changesrule now has a more flexible lower bound for API changes that involve additions, such as adding a property to a component.Previously, the lower bound for additions followed semantic versioning rules, requiring at least a minor version change. This remains the default. However, you now have the option to allow such changes at a patch version level if needed.
This behavior is configurable using existing rule configuration capabilities. To allow new property additions in a patch release, use the following configuration:
"ruleMods": { "JETWCO": { "jetwco-component-api-controlled-changes": { "enabled": true, "customOpts": { "exchangeURL": "https://component-exchange-url/api/0.2.0", "controls": { "properties": { "add": "patch" } } } } } }
-
- JAF includes new rules:
-
oj-acc-aria-accessibleandoj-tsx-acc-aria-accessibleRule: oj-acc-aria-accessible Severity: blocker Message ID: jet-8025 Rule: oj-tsx-acc-aria-accessible Severity: blocker Message ID: jet-7265 For components <oj-c-rating-gauge>, <oj-c-meter-bar>, or <oj-c-meter-circle> to be accessible, one of the following WAI-ARIA attributes: 1) 'aria-label', 'aria-labelledby', or 'aria-describedby' or one of these attributes: 2) 'labelled-by', or 'described-by' is required. -
oj-html-btn-display-iconSeverity: blocker Message ID: jet-8020 If a legacy <oj-button> does not specify a 'label' attribute, and its default slot is not used, it should specify attribute 'display="icons"'. -
oj-html-form-layout-colspan-wrapandoj-tsx-form-layout-colspan-wrapRule: oj-html-form-layout-colspan-wrap Severity: blocker Message ID: jet-8030 Rule: oj-tsx-form-layout-colspan-wrap Severity: blocker Message ID: jet-7270 When an <oj-form-layout> has <oj-label-value> children that specify a 'colspan' property, oj-form-layout's 'colspanWrap' property specifies the column spanning behavior. The 'nowrap' behavior has been deprecated as it is not specified by the Redwood Design System. In these cases, colspanWrap="wrap" needs to be specified on the <oj-form-layout> so that it will produce the correct layout as specified by the Redwood Design System. -
oj-html-ojoption-textandoj-tsx-ojoption-textRule: oj-html-ojoption-text Severity: major Message ID: jet-8005 Rule: oj-tsx-ojoption-text Severity: major Message ID: jet-7255 <oj-option> components cannot contain other custom elements that might render something other than the expected text node that is used to define the label of the option -
oj-html-redwood-bp-btn-avatarandoj-tsx-redwood-bp-btn-avatarRule: oj-html-redwood-bp-btn-avatar Severity: minor Message ID: jet-8010 Rule: oj-tsx-redwood-bp-btn-avatar Severity: minor Message ID: jet-7260 Buttons should not contain avatars, they may not correctly align within the buttonThe
redwood-strictprofile has been updated for these rules with an increased severity of major (from minor) when the JAF configuration extendsredwood-strict. -
oj-html-tabbar-progressive-popupSeverity: minor Message ID: jet-8035 For JET 18.0.0 and later, <oj-tab-bar> truncation="progressive" should always be used with overflow="popup" for handling overflow properly. If truncation="progressive" is used alone, for long labels it is possible that all items may not fit within oj-tab-bar despite being truncated. -
oj-tsx-ojtag-datacmdSeverity: major¹ Message ID's: jet-7240, 7241, 7242, 7243 Attribute 'data-oj-command' should not be used on JET web component elements if the component does not have a list of values defined for it - refer to the JET API documentation for the component. ¹ Possibility of more than 1 severity since there are 4 message ID's -
oj-tsx-slot-item-minmaxSeverity: minor¹ Message ID's: jet-7250, 7251 Components can include a 'minItems' or 'maxItems' property in a slot defintion in the component metadata, to describe how many child elements can be assigned to that slot. This rule applies to components that are directly allocated to a slot, or which are direct children of a template allocated to that slot. ¹ Possibility of more than 1 severity since there are 2 message ID's
-
Changes for rule writers:
-
Removal of deprecated DomUtils APIs
This release removes the
getAttrIndex(),getAttrPosition(), andgetAttrValuePosition()APIs that were deprecated in JAF's release 4.0.8 (February 2022). Use the replacement APIs (getAttribIndex(),getAttribPosition(), andgetAttribValuePosition()) that are functionally equivalent. See DomUtils: Node Object Functions. -
isCoreTag()deprecatedThe
isCoreTag()method is deprecated and replaced by the functionally equivalentisJetCoreTag()method. Support forisCoreTag()will be removed in a future major release of JAF. See Oracle JET Audit Metadata Interface Library Tag Methods. -
Requirement to define custom configuration properties under the
customOptsrule propertyThe requirement to declare any custom configuration properties that you define for your audits under the
customOptsrule property in therules.jsonfile (described in JAF 10.0.0 / Oracle JET 17.0.0) is now treated more leniently if you audit your app in AMD or API modes. The behavior is now the following:- If a custom rule property is not declared under the
customOptsrule property and does not have the$requiredproperty, the rule is disabled and the audit emits a warning with theJAF-2005message ID. Unlike previously, the audit continues. - If a custom rule property is not declared under the
customOptsrule property and does have the$requiredproperty, the associated rule pack is disabled and the audit continues.
In CLI mode there is no change. That is, the audit emits an error with the JAF-2005 message ID and terminates.
- If a custom rule property is not declared under the
- Updated CSS parser now supports
@containerand generates an ASTprelude.typeproperty ofAtrulePreluderather than the previous value ofRaw.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
Oracle customer access to and use of Oracle support services will be pursuant to the terms and conditions specified in their Oracle order for the applicable services.
Oracle JavaScript Extension Toolkit (Oracle JET) What's New in Oracle JET, 18.0.0
G18181-01
Primary Author: Oracle Corporation