Skip to content

Commit

Permalink
Convert to V2 Addon (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
machty authored Feb 4, 2024
1 parent ac5142c commit 15ae406
Show file tree
Hide file tree
Showing 321 changed files with 2,762 additions and 4,017 deletions.
4 changes: 0 additions & 4 deletions .bowerrc

This file was deleted.

9 changes: 2 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
- name: Test
run: pnpm test:ember --launch ${{ matrix.browser }}


try-scenarios:
name: Tests - ${{ matrix.ember-try-scenario }}
runs-on: ubuntu-latest
Expand All @@ -80,7 +79,7 @@ jobs:
- ember-5.0
- ember-release
- ember-default
- typescript-3.9
- tsc
- embroider-safe
- embroider-optimized
allow-failure: [false]
Expand All @@ -95,11 +94,7 @@ jobs:
with:
pnpm-args: --frozen-lockfile

- name: Strip ts-expect-error from tests (for TypeScript 3.7)
run: find tests/types -type f -name '*.ts' | xargs sed -i 's/@ts-expect-error/@ts-ignore/g'
if: matrix.ember-try-scenario == 'typescript-3.7'

- name: Test
env:
EMBER_TRY_SCENARIO: ${{ matrix.ember-try-scenario }}
run: node_modules/.bin/ember try:one $EMBER_TRY_SCENARIO
run: pnpm --filter test-app test:ember-try $EMBER_TRY_SCENARIO
46 changes: 22 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/tests/dummy/public/api
dist/
tmp/
/packages/test-app/public/api

# dependencies
/bower_components/
/node_modules/
node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/yarn-error.log
/testem.log
/.vscode
/package-lock.json
.env*
.pnp*
.sass-cache
.eslintcache
connect.lock
coverage/
libpeerconnection.log
npm-debug.log*
yarn-error.log
testem.log
.vscode

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
.node_modules.ember-try/
bower.json.ember-try
npm-shrinkwrap.json.ember-try
package.json.ember-try
package-lock.json.ember-try
yarn.lock.ember-try

# broccoli-debug
/DEBUG/
DEBUG/

.DS_Store
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ npx release-it

TODO: use build pipeline.
* From addon root directory `pnpm docs:build`
* View built docs in `tests/dummy/public/api`
* View built docs in `packages/test-app/public/api`

### Publishing Guides and API Docs

(Requires commit access.)

```
cd packages/test-app
./node_modules/.bin/ember github-pages:commit
git push origin gh-pages:gh-pages
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ found [here](http://ember-concurrency.com).

The [ember-concurrency documentation site](http://ember-concurrency.com) is an ember-cli app
with interactive examples powered by ember-concurrency. It runs from
ember-concurrency's [dummy test app](https://github.com/machty/ember-concurrency/tree/master/tests/dummy/app).
ember-concurrency's [test app](https://github.com/machty/ember-concurrency/tree/master/packages/test-app/app).

## Problems?

Expand Down
26 changes: 0 additions & 26 deletions index.js

This file was deleted.

1 change: 0 additions & 1 deletion jsconfig.json

This file was deleted.

136 changes: 10 additions & 126 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,133 +1,17 @@
{
"name": "ember-concurrency",
"version": "3.1.1",
"description": "Improved concurrency/async primitives for Ember.js",
"private": true,
"scripts": {
"build": "ember build --environment=production",
"docs:build": "node_modules/.bin/jsdoc -c .jsdoc --verbose",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently \"npm:lint:*:fix\" --names \"fix:\"",
"lint:hbs": "ember-template-lint .",
"lint:hbs:fix": "ember-template-lint . --fix",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"lint:ts": "tsc --noEmit",
"start": "ember serve",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test",
"test:ember-compatibility": "ember try:each"
"start": "concurrently 'pnpm:start:*' --restart-after 5000 --prefix-colors cyan,white,yellow",
"start:addon": "pnpm --filter ember-concurrency run start",
"start:test-app": "pnpm --filter test-app run start",
"lint": "pnpm run --filter '*' lint",
"lint:fix": "pnpm run --filter '*' lint:fix",
"test": "pnpm --filter test-app run test",
"test:ember": "pnpm --filter test-app run test:ember",
"docs:build": "pnpm --filter test-app run docs:build"
},
"peerDependencies": {
"ember-source": "^3.28.0 || ^4.0.0 || >=5.0.0"
},
"engines": {
"node": "16.* || >= 18"
},
"types": "./addon/index.d.ts",
"devDependencies": {
"@babel/core": "^7.12.13",
"@babel/helper-define-map": "^7.18.0",
"@babel/helper-module-imports": "^7.18.2",
"@babel/plugin-syntax-class-properties": "^7.12.13",
"@babel/plugin-syntax-decorators": "^7.12.13",
"@babel/preset-env": "^7.18.2",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@ember/test-waiters": "^3.0.0",
"@embroider/macros": "^1.13.0",
"@embroider/test-setup": "^2.1.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.0.4",
"@types/express-serve-static-core": "^4.17.33",
"@types/node": "^18.11.19",
"@types/rsvp": "^4.0.4",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
"broccoli-clean-css": "^1.1.0",
"concurrently": "^7.6.0",
"documentation": "^3.0.4",
"ember-auto-import": "^2.6.1",
"ember-cli": "~4.11.0",
"ember-cli-app-version": "^5.0.0",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-fastboot": "^4.1.2",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sass": "^10.0.1",
"ember-cli-terser": "^4.0.2",
"ember-code-snippet": "^3.0.0",
"ember-fn-helper-polyfill": "^1.0.2",
"ember-load-initializers": "^2.1.2",
"ember-modifier": "^3.2.7",
"ember-page-title": "^7.0.0",
"ember-prism": "^0.13.0",
"ember-qunit": "^6.2.0",
"ember-resolver": "^10.0.0",
"ember-sinon-qunit": "^7.1.4",
"ember-source": "~4.11.0",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^5.6.0",
"ember-try": "^3.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-ember": "^11.4.7",
"eslint-plugin-n": "^15.6.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-qunit": "^7.3.4",
"expect-type": "^0.15.0",
"jsdoc": "^3.6.6",
"jsdom": "^16.7.0",
"loader.js": "^4.7.0",
"prember": "~2.0.0",
"prettier": "^2.8.4",
"qunit": "^2.19.4",
"qunit-dom": "^2.0.0",
"sass": "^1.22.12",
"sinon": "^15.0.2",
"testem": "^3.4.2",
"typescript": "~4.9.5",
"webpack": "^5.75.0"
},
"keywords": [
"ember-addon",
"concurrency",
"task",
"tasks",
"cancellation",
"cancelation"
],
"repository": "https://github.com/machty/ember-concurrency",
"license": "MIT",
"author": "Alex Matchneer <[email protected]>",
"directories": {
"doc": "doc",
"test": "tests"
},
"dependencies": {
"@babel/helper-plugin-utils": "^7.12.13",
"@babel/types": "^7.12.13",
"@glimmer/tracking": "^1.1.2",
"ember-cli-babel": "^7.26.11",
"ember-cli-babel-plugin-helpers": "^1.1.1",
"ember-cli-htmlbars": "^6.2.0",
"ember-compatibility-helpers": "^1.2.0"
},
"resolutions": {
"klaw": "< 4",
"socket.io": "4.2.0"
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config",
"demoURL": "http://ember-concurrency.com/",
"versionCompatibility": {
"ember": ">=3.8.0"
}
"concurrently": "^8.0.0"
},
"volta": {
"node": "16.19.0",
Expand Down
4 changes: 2 additions & 2 deletions .eslintignore → packages/ember-concurrency/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/yarn.lock.ember-try

# snippets
/tests/dummy/snippets/
/packages/test-app/snippets/

# jsdoc assets
/tests/dummy/public/
/packages/test-app/public/
7 changes: 4 additions & 3 deletions .eslintrc.js → packages/ember-concurrency/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ module.exports = {
},
rules: {
'require-yield': 0,
'ember/no-computed-properties-in-native-classes': 0,
},
overrides: [
{
// Tutorial components (where specific formatting matters)
files: ['tests/dummy/app/components/tutorial-*/**/*.js'],
files: ['packages/test-app/app/components/tutorial-*/**/*.js'],
rules: {
'prettier/prettier': 'off',
},
},
{
// Docs site
files: ['tests/dummy/app/**/*.js'],
files: ['packages/test-app/app/**/*.js'],
rules: {
// Can't use Glimmer components or tracked due to 3.8 support
'ember/no-classic-classes': 'off',
Expand All @@ -56,7 +57,7 @@ module.exports = {
'./testem.js',
'./blueprints/*/index.js',
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
'./packages/test-app/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions packages/ember-concurrency/addon-main.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const { addonV1Shim } = require('@embroider/addon-shim');
module.exports = addonV1Shim(__dirname);
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions packages/ember-concurrency/babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Babel config for building the ember-concurrency package itself. Because EC is a V2 addon,
// this babel config should *not* apply presets or compile away ES modules.
// It exists only to provide development niceties for you, like automatic
// template colocation.
{
"plugins": [
"@embroider/addon-dev/template-colocation-plugin",
[
"babel-plugin-ember-template-compilation",
{
"targetFormat": "hbs",
"transforms": []
}
],
[
"module:decorator-transforms",
{ "runtime": { "import": "decorator-transforms/runtime" } }
]
]
}
Loading

0 comments on commit 15ae406

Please sign in to comment.