ember-cli / ember-rfc176-data Goto Github PK
View Code? Open in Web Editor NEWJSON data for Ember.js RFC #176
JSON data for Ember.js RFC #176
import Namespace from '@ember/application/namespace';
is listed, however I am getting a module not found
error.
This is on:
ember-cli: 3.3.0
ember-source: 3.3.0
I'm not sure if it is best to report this here or in the main Ember repo, but is this currently available / behind some kind of special flag?
Thanks!
According to #11 the following list of documented public globals APIs in Ember have no corresponding new module import paths yet:
ContainerProxyMixin
Ember.FEATURES.isEnabled
Ember.MutableEnumerable
Ember.Namespace
Ember.NativeArray
Ember.Test
Ember.Test.QUnitAdapter
Ember.testing
Ember.VERSION
RouterService
Ember.Handlebars.Utils.escapeExpression
Ember.HTMLBars.template
Ember.Handlebars.compile
user hook:
Ember.onerror
Additionally the ember-cli-shims
were exporting the following globals APIs which don't have corresponding new module import paths yet either:
Ember.destroy
Ember.SortableMixin
In API docs we call the ember version of Error, Object, and Array - EmberError, EmberObject, and EmberArray.
Part of api docs relies on localName
so we can match mapping information and give inline examples. Is it possible to change these names?
π¨ You need to enable Continuous Integration on all branches of this repository. π¨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you donβt want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
These are actually injected by ember-inflector
. The correct imports are:
import {singularize, pluralize} from 'ember-inflector';
How do we deal with this and @ember/string
?
related: #12 (comment)
Ran a codemod on this file: https://github.com/abhilashlr/ember-cli-flash/blob/master/app/initializers/flash-messages.js
Line 4 did not transform well to import { deprecate } from "@ember/application/deprecations"
as mentionned in https://github.com/emberjs/rfcs/blob/master/text/0176-javascript-module-api.md
This will be needed in 2.4 when Ember.assign
is not yet available.
Right now it is only possible to
import RSVP from 'rsvp';
but to get to Promise
or resolve()
it is not possible to
import { Promise, resolve } from 'rsvp';
IMHO we should change that
If you have inject destructured like this the ember-modules-codemod fails stating this in an unkown global:
const { inject } = Ember;
This form of destructing does work:
const { inject: { service } } = Ember;
Can/should the first case be supported?
should be available from @ember/array
https://discord.com/channels/480462759797063690/1078725868500832378/1079878481334251590
Example Error
Build Error (broccoli-persistent-filter:Babel > [Babel: @ember-data/model]) in -private/promise-many-array.ts
/Users/chasegiunta/repos/dochub/frontend/-private/promise-many-array.ts: @ember/array does not have a NativeArray export
> 1 | import ArrayMixin, { NativeArray } from '@ember/array';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | import type ArrayProxy from '@ember/array/proxy';
3 | import { assert, deprecate } from '@ember/debug';
4 | import { dependentKeyCompat } from '@ember/object/compat';SyntaxError: /Users/chasegiunta/repos/dochub/frontend/-private/promise-many-array.ts: @ember/array does not have a NativeArray export
> 1 | import ArrayMixin, { NativeArray } from '@ember/array';
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 | import type ArrayProxy from '@ember/array/proxy';
3 | import { assert, deprecate } from '@ember/debug';
4 | import { dependentKeyCompat } from '@ember/object/compat';
at File.buildCodeFrameError (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/@[email protected]/node_modules/@babel/core/lib/transformation/file/file.js:205:12)
at NodePath.buildCodeFrameError (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/index.js:105:21)
at /Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js:228:20
at Array.forEach (<anonymous>)
at processImportDeclaration (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js:188:16)
at PluginPass.ImportDeclaration (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/[email protected]/node_modules/babel-plugin-ember-modules-api-polyfill/src/index.js:321:9)
at newFn (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/visitors.js:149:21)
at NodePath._call (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/context.js:45:20)
at NodePath.call (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/context.js:35:17)
at NodePath.visit (/Users/chasegiunta/repos/dochub/frontend/node_modules/.pnpm/@[email protected]/node_modules/@babel/traverse/lib/path/context.js:80:31)
The linter suggests using { inject }
, but so many other places (including the code mod) switch it to { inject as service }
. It should be consistent throughout.
Both Ember.platform.defineProperty
and Ember.defineProperty
map to import { defineProperty } from '@ember/polyfills';
. Unfortunately, this means that the babel-plugin-ember-modules-api-polyfill package detects and uses the first (Ember.platform.defineProperty
) which leads to an error.
It seems it gives back "unknown mixin" and is different than Ember.Test.adapter
. There doesn't seem to Ember.Test.Adapter
but it actually is Ember.Test.adapter
.
cc: @rwjblue
As title, I think htmlSafe should be imported from ember/string instead of ember/template according to
https://emberjs.com/api/ember/release/modules/@ember%2Fstring
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.