Skip to content

Commit

Permalink
Convert to V2 addon (#166)
Browse files Browse the repository at this point in the history
* Convert to V2 addon

* Update packages to latest (blueprint doesn't bring atm latest)

* Recover ci / ember-try

* Fix rollup files & rollup warnings

* Add missing package `@types/qunit`

* Use non deprecated owner import

* Add helpers export

* Fix check for ability class check

* Fix lint

* Use old typed packages to get green ci

* Revert owner import (brings problem in old ember version)

* Convert helpers to TS

* Add template-registry

* Fix lint (add missing file extension)

* Remove app initializer (doesn't exists in v2 addons)

* Update ember-cli-update.json

* Remove `@babel/core` from addon dependency

* Remove ember-data model type (no ember-data installed)

* Remove pnpm override & fix pnpm lock file

* Remove `--ci-provider=travis` (addon-blueprint bug)

* Readd blueprints

* Convert blueprints to TS
  • Loading branch information
mkszepp authored May 23, 2024
1 parent d075697 commit 0cf6ef4
Show file tree
Hide file tree
Showing 101 changed files with 3,476 additions and 1,560 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ jobs:
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Node
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
Expand All @@ -32,31 +31,31 @@ jobs:
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm test:ember
run: pnpm test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --no-lockfile
- name: Run Tests
run: pnpm test:ember
run: pnpm test

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: "test"
needs: 'test'
timeout-minutes: 10

strategy:
Expand All @@ -78,16 +77,16 @@ jobs:
- embroider-optimized

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Install Node
uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app
71 changes: 0 additions & 71 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Because this library needs to be built,
# we can't easily point package.json files at the git repo for easy cross-repo testing.
#
# This workflow brings back that capability by placing the compiled assets on a "dist" branch
# (configurable via the "branch" option below)
name: Push dist

on:
push:
branches:
- main
- master

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: kategengler/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'ember-can'
25 changes: 11 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# compiled output
/dist/
/declarations/
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules/
node_modules/

# misc
/.env*
/.pnp*
/.eslintcache
/coverage/
/npm-debug.log*
/testem.log
/yarn-error.log
.env*
.pnp*
.pnpm-debug.log
.sass-cache
.eslintcache
coverage/
npm-debug.log*
yarn-error.log

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

# broccoli-debug
/DEBUG/
37 changes: 0 additions & 37 deletions .npmignore

This file was deleted.

9 changes: 9 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Docs: https://pnpm.io/npmrc
# https://github.com/emberjs/rfcs/pull/907

# we don't want addons to be bad citizens of the ecosystem
auto-install-peers=false

# we want true isolation,
# if a dependency is not declared, we want an error
resolve-peers-from-workspace-root=false
11 changes: 4 additions & 7 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/
# Prettier is also run from each package, so the ignores here
# protect against files that may not be within a package

# misc
/coverage/
!.*
.*/
.lint-todo/

# ember-try
/.node_modules.ember-try/
/pnpm-lock.ember-try.yaml
6 changes: 6 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
singleQuote: true,
};
Loading

0 comments on commit 0cf6ef4

Please sign in to comment.