https://github.com/ember-codemods/ember-data-codemod
A codemod to upgrade to new ember-data packages
https://github.com/ember-codemods/ember-data-codemod
codemod ember-data ember-modules-codemod
Last synced: about 1 year ago
JSON representation
A codemod to upgrade to new ember-data packages
- Host: GitHub
- URL: https://github.com/ember-codemods/ember-data-codemod
- Owner: ember-codemods
- Created: 2019-04-05T17:35:59.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T04:08:02.000Z (over 3 years ago)
- Last Synced: 2025-04-05T08:55:27.651Z (about 1 year ago)
- Topics: codemod, ember-data, ember-modules-codemod
- Language: JavaScript
- Homepage:
- Size: 1.48 MB
- Stars: 13
- Watchers: 1
- Forks: 7
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Ember Data Codemod
A collection of codemods for ember-data. For now, it only contains a codemod to upgrade to the new "@ember-data" packages!
## Usage
To run a specific codemod from this project, you would run the following:
```
npx ember-data-codemod path/of/files/ or/some**/*glob.js
# or
yarn global add ember-data-codemod
ember-data-codemod path/of/files/ or/some**/*glob.js
```
To run every codemod from this project, you would run the following:
```
npx ember-data-codemod . path/of/files/ or/some**/*glob.js
# or
yarn global add ember-data-codemod
ember-data-codemod . path/of/files/ or/some**/*glob.js
```
## Transforms
* [globals-to-ember-data-imports](transforms/globals-to-ember-data-imports/README.md)
## Contributing
### Installation
* clone the repo
* change into the repo directory
* `yarn`
### Running tests
* `yarn test`
### Update Documentation
* `yarn update-docs`
## Credits
This repository is intially a fork of [ember-modules-codemod](https://github.com/ember-cli/ember-modules-codemod) adapted for the needs of ember-data. [This PR](https://github.com/dcyriller/ember-data-codemod/pull/1) illustrates the work needed to adapt ember-modules-codemod to fit ember-data needs.
This codemod uses [`jscodeshift`](https://github.com/facebook/jscodeshift)
## Links
* [RFC 395: @ember-data packages](https://github.com/emberjs/rfcs/pull/395)
* [ember/use-ember-data-rfc-395-imports](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/use-ember-data-rfc-395-imports.md) lint rule