mirego/accent

TypeError: (0 , decamelize_1.default) is not a function

Closed this issue · 2 comments

After updating the package I started to get this error:

npx accent sync --dry-run
Fetch config in accent.json... API Client ✓

Syncing sources → en  ✓

    TypeError: (0 , decamelize_1.default) is not a function

accent-cli@0.12 is latest working version

js bundle references a decamelize_1.default that doesn't exist

https://unpkg.com/accent-cli@0.14.1/lib/services/formatters/hook-runner.js

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// Vendor
const chalk = require("chalk");
const decamelize_1 = require("decamelize");
const capitalizeFirstLetter = (str) => str.charAt(0).toUpperCase() + str.slice(1);
class HookRunnerFomatter {
    log(name, commands) {
        const operation = capitalizeFirstLetter((0, decamelize_1.default)(name, { separator: ' ' }));
        console.log(chalk.yellow('➤ '), chalk.bold(chalk.yellow(`${operation}:`)));
        commands.forEach((command) => {
            console.log('  ', chalk.yellow(command));
        });
        console.log('');
    }
}
exports.default = HookRunnerFomatter;

Let me know if you need more information.

Right, the dependency was removed in a refactor but I did not test the hooks feature! Will be fixed in the next release!