willrax / ember-luxon Goto Github PK
View Code? Open in Web Editor NEW๐ ๐ [deprecated] Addon thats brings Luxon to Ember applications.
License: MIT License
๐ ๐ [deprecated] Addon thats brings Luxon to Ember applications.
License: MIT License
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/impl/locale.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/settings.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/impl/locale.js
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/duration.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/impl/locale.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/interval.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js
Circular dependency: tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/info.js -> tmp/rollup-cache_path-aCxGLew4.tmp/build/datetime.js
Build Error (broccoli-persistent-filter:Babel > [Babel: PROJECTNAME]) in luxon.js
luxon.js: Property object of MemberExpression expected node to be of a type ["Expression"] but instead got null
Stack Trace and Error Report: /var/folders/sk/f8z9r_gd3qx0ycfccdxbfd7c0000gn/T/error.dump.406a591d1c334e86c29e015452028671.log
I'll try to fix this in our fork and will try to provide a PR.
Dependabot couldn't reach artifacts.netflix.com as it timed out.
Is artifacts.netflix.com accessible over the internet? If it is then this may be a transitory issue and can be ignored - Dependabot will close it on its next successful update run.
You can mention @dependabot in the comments below to contact the Dependabot team.
ember-moment provides a range of helpers:
https://github.com/stefanpenner/ember-moment#helpers
ember-luxon should provide similar drop-in replacements to make it easier to switch.
{{luxon '12-25-1995' 'MM-DD-YYYY'}}
{{luxon-format '12-25-1995' 'MM/DD/YYYY' 'MM-DD-YYYY'}} {{!-- outputFormat and inputFormat are optional --}}
{{luxon-duration number units}} {{!-- units is optional --}}
{{luxon-diff dateA dateB precision='day' float=true}} {{!-- precision is optional, float is optional --}}
{{is-before date comparison precision='year'}} {{!-- precision is optional --}}
{{is-after date comparison precision='year'}} {{!-- precision is optional --}}
{{is-same date comparison precision='year'}} {{!-- precision is optional --}}
{{is-same-or-before date comparison precision='year'}} {{!-- precision is optional --}}
{{is-same-or-after date comparison precision='year'}} {{!-- precision is optional --}}
{{is-between date comparisonA comparisonB precision='year' inclusivity='[)'}} {{!-- precision is optional, inclusivity optional --}}
Not supported by Luxon:
Line 19 in 75afb0d
This fails in Yarn workspaces and other setups that may require modules to be resolved properly. The resolve
package should be used to find the true path of a module.
Ember-Moment and others allow you to import the library they shim by name, i.e.
import 'moment' from 'moment';
I think doing the same with this addon might be useful, comparing
import { DateTime } from 'ember-luxon/luxon';
// vs
import { DateTime } from 'luxon';
The current option, while it safeguards against namespace collisions feels rather unnatural given that Luxon is provided as a ES6 module and uses the latter option in their own documentation.
needs to be updated.
Does this repo need maintainers to get things merged in a timely manner?
A feature that is not supported by ember-moment, but is available as additional addon.
Ember Data has a date
transform that deserializes ISO dates to native Date()
objects. Having a similar transform that provides Luxon objects instead is highly desired as it makes sense to have any occurrence of calendrical data in one format (especially given the welcome deviations in Luxon).
Given that luxon has multiple data structures, this addon should provide a transform for any reasonable variant.
ember-moment provides a few macros which deliver computed properties for various variants that can even be composed together: duration
, humanize
, locale
, tz
, format
, calendar
, moment
, toNow
, fromNow
.
More details in their Computed Property Macro Documentation
I think it's reasonable to provide at least the same or event a larger set of helpers in the same fashion to make it easier to convert projects to Luxon.
First of all, thank you very much for rewarding my laziness and creating this addon for me. Or in a more serious way: Thanks for doing this, it's much appreciated.
As we plan to move to Luxon for our next projects, I'd love to help making this a full fledged replacement solution for ember-moment.
Luxon requires rather new browsers. In case support for legacy browsers is requires, either Intl.js or support for time zones has to be polyfilled as described in the Luxon documentation
This addon should provide options to automatically polyfill these features based on the targets.js
provided by Ember-CLI or based on options set in ember-cli-build.js
.
targets.js
ember-cli-build.js
(Any of my feature requests could also be moved to a separate addon, lets discuss!)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.