Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file is committed to git and should not contain any secrets.
#
# Vite recommends using .env.local or .env.[mode].local if you need to manage secrets
# SEE: https://vite.dev/guide/env-and-mode.html#env-files for more information.


# Default NODE_ENV with vite build --mode=test is production
NODE_ENV=development
# VITE_SHADOW_DOM_BUILD=true # Activate this option to run the demo app and all tests within the Shadow DOM.
115 changes: 34 additions & 81 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:

jobs:
lint:
name: Lint
name: "Lints"
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -22,125 +22,78 @@ jobs:
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: pnpm

- name: 'Install dependencies'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Lint
run: pnpm --filter ember-basic-dropdown --filter test-app lint
run: pnpm lint

test:
name: "Tests"
runs-on: ubuntu-latest
needs: lint
timeout-minutes: 10
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter test-app test:ember

test-shadow-dom:
name: "Tests Shadow dom"
runs-on: ubuntu-latest
needs: lint

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Tests
run: pnpm --filter test-app test:ember-shadow-dom
run: pnpm test
# For the Try Scenarios
- id: set-matrix
run: |
echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT


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

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

run: pnpm install --no-lockfile
- name: Run Tests
run: pnpm --filter test-app test:ember
run: pnpm test

try-scenarios:
name: ${{ matrix.try-scenario }}
name: ${{ matrix.name }}
runs-on: ubuntu-latest
continue-on-error: true
needs: test

needs: "test"
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- ember-lts-5.12
- ember-lts-6.4
- ember-lts-6.8
- ember-release
- ember-beta
- ember-canary
- embroider-safe
- embroider-optimized
matrix: ${{fromJson(needs.test.outputs.matrix)}}

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: pnpm

- name: Apply Scenario
run: |
pnpm dlx @embroider/try apply ${{ matrix.name }}

- name: Install Dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm i -f # re-sync injected deps

run: pnpm install --no-lockfile
- name: Run Tests
env:
EMBER_TRY_SCENARIO: ${{ matrix.try-scenario }}
run: pnpm --filter test-app test:ember-try $EMBER_TRY_SCENARIO --skip-cleanup
run: |
pnpm test

env: ${{ matrix.env }}
49 changes: 17 additions & 32 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,21 @@ permissions:

jobs:
lint:
name: Lint
name: "Lints"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'

- name: 'Install dependencies'
node-version: 22
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Addon Build
run: pnpm build
- name: Lint
run: pnpm --filter docs lint

Expand All @@ -43,19 +41,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Addon Build
run: pnpm build
- name: Run Tests
run: pnpm --filter docs test:ember

Expand All @@ -68,30 +61,22 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- name: Install Node
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: pnpm

- name: Install Dependencies
run: pnpm install --frozen-lockfile

- run: pnpm build
- run: pnpm i -f # re-sync injected deps

- name: Run Addon Build
run: pnpm build
- name: Run Tests
run: pnpm --filter docs build

- name: Copy 404 page
run: cp ./docs/404.html ./docs/dist/404.html

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: './docs/dist'

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Because this library needs to be built,
# 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
Expand All @@ -22,15 +22,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
node-version: 22
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- uses: kategengler/put-built-npm-package-contents-on-branch@v2.0.0
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'ember-basic-dropdown'
33 changes: 15 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
dist/
dist-tests/
declarations/
src/vendor/

# dependencies
node_modules/
# from scenarios
tmp/
config/optional-features.json
ember-cli-build.cjs

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

# ember-try
/.node_modules.ember-try/
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
/pnpm-lock.ember-try.yaml
# deps & caches
node_modules/
.eslintcache
.prettiercache
9 changes: 0 additions & 9 deletions .npmrc

This file was deleted.

18 changes: 18 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/
/dist-*/
/declarations/
/src/vendor/

# misc
/coverage/
pnpm-lock.yaml
config/ember-cli-update.json
*.yaml
*.yml
*.md
*.html
CHANGELOG.md
6 changes: 0 additions & 6 deletions .prettierrc.cjs

This file was deleted.

4 changes: 1 addition & 3 deletions ember-basic-dropdown/.prettierrc.cjs → .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
'use strict';

module.exports = {
export default {
plugins: ['prettier-plugin-ember-template-tag'],
overrides: [
{
Expand Down
4 changes: 4 additions & 0 deletions .template-lintrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
extends: 'recommended',
checkHbsTemplateLiterals: false,
};
Loading