Skip to content

Commit da25aaa

Browse files
fix(compiler): deprecate scriptDataOpts (#5737)
* fix(compiler): deprecate scriptDataOpts STENCIL-665 * Update src/declarations/stencil-public-compiler.ts Co-authored-by: Alice Pote <[email protected]> --------- Co-authored-by: Alice Pote <[email protected]>
1 parent b0a9f7b commit da25aaa

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

src/app-data/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export const BUILD: BuildConditionals = {
8888
cloneNodeFix: false,
8989
hydratedAttribute: false,
9090
hydratedClass: true,
91+
// TODO(STENCIL-1305): remove this option
9192
scriptDataOpts: false,
9293
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
9394
scopedSlotTextContentFix: false,

src/compiler/app-core/app-data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ export const updateBuildConditionals = (config: ValidatedConfig, b: BuildConditi
176176
b.lifecycleDOMEvents = !!(b.isDebug || config._isTesting || config.extras.lifecycleDOMEvents);
177177
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
178178
b.scopedSlotTextContentFix = !!config.extras.scopedSlotTextContentFix;
179+
// TODO(STENCIL-1305): remove this option
179180
b.scriptDataOpts = config.extras.scriptDataOpts;
180181
b.attachStyles = true;
181182
b.invisiblePrehydration = typeof config.invisiblePrehydration === 'undefined' ? true : config.invisiblePrehydration;

src/compiler/output-targets/dist-hydrate-script/hydrate-build-conditionals.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export const getHydrateBuildConditionals = (cmps: d.ComponentCompilerMeta[]) =>
3434
build.shadowDomShim = true;
3535
build.hydratedAttribute = false;
3636
build.hydratedClass = true;
37+
// TODO(STENCIL-1305): remove this option
3738
build.scriptDataOpts = false;
3839
build.attachStyles = true;
3940

src/declarations/stencil-private.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export interface BuildConditionals extends Partial<BuildFeatures> {
181181
hydratedAttribute?: boolean;
182182
hydratedClass?: boolean;
183183
initializeNextTick?: boolean;
184+
// TODO(STENCIL-1305): remove this option
184185
scriptDataOpts?: boolean;
185186
// TODO(STENCIL-854): Remove code related to legacy shadowDomShim field
186187
shadowDomShim?: boolean;

src/declarations/stencil-public-compiler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ interface ConfigExtrasBase {
328328
* It is possible to assign data to the actual `<script>` element's `data-opts` property,
329329
* which then gets passed to Stencil's initial bootstrap. This feature is only required
330330
* for very special cases and rarely needed. Defaults to `false`.
331+
* @deprecated This option has been deprecated and will be removed in a future major version of Stencil.
331332
*/
332333
scriptDataOpts?: boolean;
333334

src/testing/reset-build-conditionals.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export function resetBuildConditionals(b: d.BuildConditionals) {
5050
b.appendChildSlotFix = false;
5151
b.cloneNodeFix = false;
5252
b.hotModuleReplacement = false;
53+
// TODO(STENCIL-1305): remove this option
5354
b.scriptDataOpts = false;
5455
// TODO(STENCIL-914): remove this option when `experimentalSlotFixes` is the default behavior
5556
b.scopedSlotTextContentFix = false;

0 commit comments

Comments
 (0)