Today I Learned

6 posts by dawidpośliński

How to use in-repo add-on in another in-repo addon

If you like to have access to in-repo addon from the main app you add in your main app package.json the following code:

"ember-addon": {
  "paths": [

If you like to have access from your in-repo addon to add-ons in your main app (in this case ember-can) - you would do:

"dependencies": {
  "ember-can": "*",

But how to access in-repo add-on #1 in your in-repo add-on #2?

If you like to use a code from in-repo addon #1 in another in-repo addon #2 you have to do it relatively:

In-repo addon #1 package.json:

"ember-addon": {
  "paths": [

In-repo addon problem with imports from RFC#176


I was moving a component from base application (Ember 3.3) to in-repo addon.

It uses import from #RFC176:

import { computed } from '@ember/object';

That caused the following error:

Uncaught Error: Could not find module "@ember/object" imported from "in-repo-addon/components/component-name"


I had to make sure than in my in-repo addon package.json had the following dependency:

  "name": "in-repo addon name",
  "keywords": [
  "dependencies": {
    "ember-cli-babel": "*"

That’s it :)


In the given scenario:

  1. Pull request was merged
  2. The connected branch#1 was removed
  3. Merged PR was reverted
  4. You don’t have branch#1, but you can see the reverted commit#1

All you have to do is to track the commit#1 and revert reverted commit.

$ git revert commit#1

Clean up local list of your git branches

Have you ever had to search through a long list of local branches, which are mostly obsolete for you?

To keep your local git repository slim and avoid a long list of branches while doing git branch, there is an easy strategy that can save you a bit of time.

First, always remember to push everything you did to the remote when you leave a desk, then just run in the console:

git branch | grep -v "master" | xargs git branch -D

It will remove all your local branches except master. If you need to restore any particular branch, you can fetch and checkout - it will wait for you on your remote!

Remove Docker containers/cache

docker system prune -a -f

WARNING! This will remove:
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all build cache
Deleted Containers:

Total reclaimed space: 14.83GB