Skip to content

Commit

Permalink
chore: add deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
idoros committed Oct 10, 2023
1 parent f2601e9 commit 8950526
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/core/src/stylable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import { STImport, STScope, STVar, STMixin, CSSClass, CSSCustomProperty } from './features';
import { Dependency, visitMetaCSSDependencies } from './visit-meta-css-dependencies';
import * as postcss from 'postcss';
import { warnOnce } from './helpers/deprecation';

export interface StylableConfigBase {
projectRoot: string;
Expand Down Expand Up @@ -100,6 +101,11 @@ export class Stylable {
constructor(config: StylableConfig) {
this.experimentalSelectorInference =
config.experimentalSelectorInference === false ? false : true;
if (this.experimentalSelectorInference === false) {
warnOnce(
'Stylable is running in a deprecated mode that will be removed in a future 6.x.x release. Please set experimentalSelectorInference=true to avoid this warning.'
);
}
this.projectRoot = config.projectRoot;
this.fileSystem = config.fileSystem;
this.requireModule =
Expand Down

0 comments on commit 8950526

Please sign in to comment.