Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed May 30, 2024
1 parent 359b546 commit a4c741c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 1 addition & 15 deletions lib/src/deprecations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,12 @@
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

import {deprecations} from './vendor/deprecations';
import {Deprecation, DeprecationOrId} from './vendor/sass';
import {DeprecationOrId} from './vendor/sass';
import {Version} from './version';

export {deprecations} from './vendor/deprecations';
export {Deprecation, DeprecationOrId, DeprecationStatus} from './vendor/sass';

/**
* Returns whether the given deprecation was active in the given version.
*/
function isActiveIn(deprecation: Deprecation, version: Version) {
const deprecatedIn = deprecation.deprecatedIn;
if (deprecation.status !== 'active' || !deprecatedIn) return false;
if (version.major > deprecatedIn.major) return true;
if (version.major < deprecatedIn.major) return false;
if (version.minor > deprecatedIn.minor) return true;
if (version.minor < deprecatedIn.minor) return false;
return version.patch >= deprecatedIn.patch;
}

/**
* Converts a mixed array of deprecations, IDs, and versions to an array of IDs
* that's ready to include in a CompileRequest.
Expand Down
2 changes: 0 additions & 2 deletions lib/src/legacy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ import {
LegacyStringOptions,
Options,
StringOptions,
Importer,
FileImporter,
} from '../vendor/sass';
import {wrapFunction} from './value/wrap';
import {endOfLoadProtocol, LegacyImporterWrapper} from './importer';
Expand Down

0 comments on commit a4c741c

Please sign in to comment.