Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(U+0307) is not a valid identifier start char #941

Closed
brancusi opened this issue Oct 6, 2021 · 6 comments
Closed

(U+0307) is not a valid identifier start char #941

brancusi opened this issue Oct 6, 2021 · 6 comments

Comments

@brancusi
Copy link

brancusi commented Oct 6, 2021

After updating to "2.15.10" I'm getting this error:

Errors encountered while trying to parse file
[shadow:watch ]   node_modules/lower-case/dist/index.js
[shadow:watch ]   {:line 13, :column 13, :message "Character '̇' (U+0307) is not a valid identifier start char"}

Offending file is lower-case

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.lowerCase = exports.localeLowerCase = void 0;
/**
 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
 */
var SUPPORTED_LOCALE = {
    tr: {
        regexp: /\u0130|\u0049|\u0049\u0307/g,
        map: {
            İ: "\u0069",
            I: "\u0131",
            İ: "\u0069",
        },
    },
    az: {
        regexp: /\u0130/g,
        map: {
            İ: "\u0069",
            I: "\u0131",
            İ: "\u0069",
        },
    },
    lt: {
        regexp: /\u0049|\u004A|\u012E|\u00CC|\u00CD|\u0128/g,
        map: {
            I: "\u0069\u0307",
            J: "\u006A\u0307",
            Į: "\u012F\u0307",
            Ì: "\u0069\u0307\u0300",
            Í: "\u0069\u0307\u0301",
            Ĩ: "\u0069\u0307\u0303",
        },
    },
};
/**
 * Localized lower case.
 */
function localeLowerCase(str, locale) {
    var lang = SUPPORTED_LOCALE[locale.toLowerCase()];
    if (lang)
        return lowerCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));
    return lowerCase(str);
}
exports.localeLowerCase = localeLowerCase;
/**
 * Lower case as a function.
 */
function lowerCase(str) {
    return str.toLowerCase();
}
exports.lowerCase = lowerCase;
//# sourceMappingURL=index.js.map

Seeing that this is an old issue. Also, I moved to deps.edn so I'm not sure about the previous shadow-version since I was using shadow-cljs directly to start shadow.

Thanks

@brancusi
Copy link
Author

brancusi commented Oct 6, 2021

I was able to resolve this by removing a random js dep in package.json.

@thheller thheller closed this as completed Oct 9, 2021
@eraad
Copy link

eraad commented Dec 31, 2021

Hi, I'm having the same issue, related to the same library lower-case. I would appreciate if you have any tips about this.

@sebastibe
Copy link

I am having the same issue as well.

@thheller
Copy link
Owner

It would be really helpful if anyone can setup a reproducible repo. I don't have any guess as to what may be causing this. Please provide more info about your overall setup. JVM version, OS, shadow-cljs version, node version, etc.

@lsenjov
Copy link

lsenjov commented Apr 25, 2022

@thheller stumbled across it today, this should do it https://github.com/lsenjov/lower-case-reproduce

@thheller
Copy link
Owner

This an issue within the Google Closure Compiler.

See google/closure-compiler#3639

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants