HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/quadcode/one-time-popup/node_modules/sass-embedded/dist/tool/get-deprecations.js
"use strict";
// Generates the list of deprecations from spec/deprecations.yaml in the
// language repo.
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDeprecations = getDeprecations;
const fs = require("fs");
const yaml_1 = require("yaml");
const yamlFile = 'build/sass/spec/deprecations.yaml';
/**
 * Converts a version string in the form X.Y.Z to be code calling the Version
 * constructor, or null if the string is undefined.
 */
function toVersionCode(version) {
    if (!version)
        return 'null';
    const match = version.match(/^(\d+)\.(\d+)\.(\d+)$/);
    if (match === null) {
        throw new Error(`Invalid version ${version}`);
    }
    return `new Version(${match[1]}, ${match[2]}, ${match[3]})`;
}
/**
 * Generates the list of deprecations based on the YAML file in the language
 * repo.
 */
async function getDeprecations(outDirectory) {
    const yamlText = fs.readFileSync(yamlFile, 'utf8');
    const deprecations = (0, yaml_1.parse)(yamlText);
    let tsText = "import {Deprecations} from './sass';\n" +
        "import {Version} from '../version';\n\n" +
        'export const deprecations: Deprecations = {\n';
    for (const [id, deprecation] of Object.entries(deprecations)) {
        const key = id.includes('-') ? `'${id}'` : id;
        const dartSass = deprecation['dart-sass'];
        tsText +=
            `  ${key}: {\n` +
                `    id: '${id}',\n` +
                `    description: '${deprecation.description}',\n` +
                `    status: '${dartSass.status}',\n` +
                `    deprecatedIn: ${toVersionCode(dartSass.deprecated)},\n` +
                `    obsoleteIn: ${toVersionCode(dartSass.obsolete)},\n` +
                '  },\n';
    }
    tsText +=
        "  'user-authored': {\n" +
            "    id: 'user-authored',\n" +
            "    status: 'user',\n" +
            '    deprecatedIn: null,\n' +
            '    obsoleteIn: null,\n' +
            '  },\n' +
            '}\n';
    fs.writeFileSync(`${outDirectory}/deprecations.ts`, tsText);
}
//# sourceMappingURL=get-deprecations.js.map