GitXplorerGitXplorer
c

ember-concurrency-decorators-codemod

public
0 stars
1 forks
0 issues

Commits

List of commits on branch main.
Unverified
c58ba34ca04440fcba7a69f9b14d5cc5c182a688

build(deps): bump all dependencies

ccamerondubas committed 2 years ago
Unverified
f7c24ac7ad36610c711a7bf07e30389d27e5da0e

feat: add support for typescript files

ccamerondubas committed 2 years ago
Unverified
e09f8084dcfe163e4f260122a1465caeca8a0fb8

refactor: convert codebase to typescript

ccamerondubas committed 2 years ago
Unverified
8292bf0bb1c752f8e287b5623135a4961af1dc72

build(deps): bump dependencies

ccamerondubas committed 2 years ago
Unverified
02c636536e84f056634ab0312eed69ebf2f91856

chore: add vscode debugger config

ccamerondubas committed 2 years ago
Unverified
34bfdf6762805dcdeeaaaacf16abe53db701fb63

refactor: preserve import location

ccamerondubas committed 2 years ago

README

The README file for this repository.

ember-concurrency-decorators-codemod · License CircleCI Status NPM Version

As of ember-concurrency 2.0.0, the decorators provided by ember-concurrency-decorators have been moved directly into ember-concurrency, removing the need for this additional package. This codemod refactors away existing ember-concurrency-decorators imports automatically.

Prerequisites

  • The target Ember app or addon must be using ember-concurrency >=2.0.0 in order for decorator imports to be available.

Usage

git clone https://github.com/camerondubas/ember-concurrency-decorators-codemod
cd ember-concurrency-decorators-codemod
npm install
npx jscodeshift -t refactor-imports.ts <path/*glob>.js <path/*glob>.ts
Options

--quotes: Whether to use 'single' or "double" quotes for strings. Default value: single

Examples

With ember-concurrency import

Before:

import Component from '@glimmer/component';
import { timeout } from 'ember-concurrency';
import { dropTask, task } from 'ember-concurrency-decorators';
...

After:

import Component from '@glimmer/component';
import { timeout, dropTask, task } from 'ember-concurrency';
...

Withoutember-concurrency import

Before:

import Component from '@glimmer/component';
import { dropTask, task } from 'ember-concurrency-decorators';
...

After:

import Component from '@glimmer/component';
import { dropTask, task } from 'ember-concurrency';
...

Typescript ember-concurrency import

Before:

import Component from '@glimmer/component';
import { timeout } from 'ember-concurrency';
import { dropTask, task } from 'ember-concurrency-decorators';

import type { TaskGenerator } from "ember-concurrency";
...

After:

import Component from '@glimmer/component';
import { timeout, dropTask, task } from 'ember-concurrency';

import type { TaskGenerator } from "ember-concurrency";
...

Testing

yarn test

Linting

yarn lint

License

This project is licensed under the MIT License.