urish / ngx-moment

moment.js pipes for Angular
MIT License
1.17k stars 154 forks source link

fix: update deps for fix bundle compilation #273

Closed Delagen closed 2 years ago

Delagen commented 2 years ago

272

Delagen commented 2 years ago

@urish Try this to resolve 6.0.0 release issue

urish commented 2 years ago

Thanks, have you tested this?

Also, husky 6 had some breaking changes, so if you upgrade it, please update the configuration accordingly

Delagen commented 2 years ago

Thanks. Updated MR

urish commented 2 years ago

Thanks for the update. Have you tested that this actually fixes the issue in #272?

Delagen commented 2 years ago

added "postinstall": "husky install" to support yarn. When dist compiled, section scripts removed, so it's safe.

urish commented 2 years ago

I'm not sure I explained myself correctly - do we have any evidence that this change solves the issue in #272?

specifically, this:

Error: export 'MomentModule' (imported as 'MomentModule') was not found in 'ngx-moment' (module has no exports)

Delagen commented 2 years ago

Error cause that bundle in fesm2020 in npm package consist only from root wrapper and does not contain any more code. Seems it was error in early version of 13 compiler

Thats the content of packaged bundle

"use strict";
/**
 * Generated bundle index. Do not edit.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
    for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./index"), exports);
//# sourceMappingURL=ngx-moment.mjs.map

As you see no any usefull code fesm2015 the same

urish commented 2 years ago

Got it, thanks for explaining!

One more thing: I see the commit includes both "packages-lock.json" and "yarn.lock". Let's keep remove one of them (I don't have a strong opinion which), otherwise it's easy to get them out of sync.

Delagen commented 2 years ago

NPM 8 keep it sync, I think better to have NPM instead of yarn, I have seen few projects that need yarn really.

urish commented 2 years ago

So can you please remove yarn.lock? Not everyone has npm 8 yet

Delagen commented 2 years ago

Done

urish commented 2 years ago

Thank you!

urish commented 2 years ago

released as 6.0.1

urish commented 2 years ago

Thanks again for looking into this