Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate hard mode #1

Open
wants to merge 42 commits into
base: v2-addon-nvp
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9b28a77
Run migrator
NullVoxPopuli May 7, 2022
0654f8e
Restore top-level package.json entries
NullVoxPopuli May 7, 2022
1db97b2
Resolves: #94, re-export public API components from index
NullVoxPopuli May 7, 2022
7ce1137
Add ts to lint-staged
NullVoxPopuli May 7, 2022
24fd196
Trick CI into building the addon via prepare script
NullVoxPopuli May 7, 2022
10c3aba
Test against multiple typescript versions
NullVoxPopuli May 7, 2022
d19228c
Switch to pnpm, because yarn's dependency bugs are just too annoying …
NullVoxPopuli May 7, 2022
04beff3
Update Lint and Docs workflows, prepare for separate docs app
NullVoxPopuli May 7, 2022
aca8989
Update CI.yml to use pnpm and do the typescript checking
NullVoxPopuli May 7, 2022
434c27e
Fix CI workflow
NullVoxPopuli May 7, 2022
d0b1b1d
Update CI.yml to use pnpm and do the typescript checking
NullVoxPopuli May 7, 2022
4b45dcc
Run build, but also notice that tsc needs to allowJs
NullVoxPopuli May 7, 2022
3213481
Resolve some type issues and get a successful build
NullVoxPopuli May 7, 2022
1d600a0
Declare peers and fix some imports
NullVoxPopuli May 7, 2022
f09a9ce
Remove mentions of yarn, swap for pnpm
NullVoxPopuli May 7, 2022
1e64c86
Fix build script
NullVoxPopuli May 7, 2022
5cb70e6
Clear dirty local node_modules from yarn, and try re-building. Local …
NullVoxPopuli May 7, 2022
4ee61b8
Add deps needed for type checking
NullVoxPopuli May 7, 2022
a70e34d
Use more generic tsconfig options in the test app
NullVoxPopuli May 7, 2022
925a653
Update try scenarios
NullVoxPopuli May 7, 2022
c3a0adf
Run lint fix for js
NullVoxPopuli May 7, 2022
7e45901
Update try scenarios
NullVoxPopuli May 7, 2022
d0aeb64
Update try scenarios
NullVoxPopuli May 7, 2022
0668a97
Make top-level lint/lint:fix work. This was new to me, and now has me…
NullVoxPopuli May 7, 2022
2c9d3f8
Remove tailwind from test app. Tailwind will go in the docs app
NullVoxPopuli May 7, 2022
c636451
Test app's auto-import must be v2
NullVoxPopuli May 7, 2022
582b914
Delete travis config
NullVoxPopuli May 7, 2022
42fe9a8
Scaffold new docs app
NullVoxPopuli May 7, 2022
613c592
Copy the components and templates from the old dummy app to the new d…
NullVoxPopuli May 7, 2022
64c6e36
Copy tailwind stuff from v1 addon's setup
NullVoxPopuli May 7, 2022
589866d
Remove ember-data
NullVoxPopuli May 7, 2022
90c5613
Remove ember-welcome-page
NullVoxPopuli May 7, 2022
a779b7a
Update a couple deps
NullVoxPopuli May 7, 2022
32acdc9
Correct dependencies -- release-it stuff now lives in the addon, etc
NullVoxPopuli May 8, 2022
3f5daab
Update local test-app ember-source to get rid of deprecation message …
NullVoxPopuli May 8, 2022
50f5bbe
testdouble does not have a default export
NullVoxPopuli May 8, 2022
5cfd828
Copy package.json from another project to try to discover differences…
NullVoxPopuli May 8, 2022
37aac00
Update deps and config
NullVoxPopuli May 14, 2022
613ca59
Add build test to ensure d.ts.map files don't get removed
NullVoxPopuli May 14, 2022
15a7dae
Add needed .eslintrc files
NullVoxPopuli May 14, 2022
e7fc5ed
Upgrade tracked-maps-and-sets
NullVoxPopuli May 14, 2022
72ed2e0
Demonstrate hard mode
NullVoxPopuli May 14, 2022
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: 0 additions & 9 deletions .ember-cli

This file was deleted.

5 changes: 5 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

const { configs } = require('@nullvoxpopuli/eslint-configs');

module.exports = configs.node();
189 changes: 114 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,105 +1,144 @@
name: CI

on:
pull_request:
pull_request: null
push:
branches:
- main
- master

schedule:
- cron: 0 3 * * 0
env:
CI: true
dist: ember-resources/dist
jobs:
lint:
build_test:
name: Build Tests
timeout-minutes: 5
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: volta-cli/action@v1

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive

- name: lint
run: yarn lint

type-check:
name: Type Checking
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive

- name: Type Checking
run: yarn prepack

test:
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
- name: Install Dependencies
run: pnpm install
- name: Build and Assert Output
run: pnpm --filter build-test test

tests:
name: Tests
timeout-minutes: 5
runs-on: ubuntu-latest

strategy:
matrix:
node:
- "12"
- "14"
- "16"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: volta-cli/action@v1

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
node-version: ${{ matrix.node }}
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive

- name: test
run: yarn ember test

ember-try:
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
- name: Install Dependencies
run: pnpm install
- name: Test with ${{ matrix.node }}
run: pnpm --filter test-app run test:ember

try-scenarios:
name: ${{ matrix.ember-try-scenario }}
timeout-minutes: 10
runs-on: ubuntu-latest
needs: ['lint', 'test']
needs: [tests, build_test]
strategy:
fail-fast: true
matrix:
ember-try-scenario:
- ember-minimum-supported
- ember-lts-3-28
- ember-3.28
- ember-4.0.0
- ember-release
- ember-beta
- ember-canary

- embroider-safe
- embroider-optimized
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
with:
node-version: 12.x
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
- name: Install Dependencies
run: pnpm install
- name: test
working-directory: test-app
run: >
node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }}
--skip-cleanup

typescript-compatibility:
name: types w/ ${{ matrix.typescript-scenario }}
timeout-minutes: 5
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: true
matrix:
typescript-scenario:
- typescript@4.2
- typescript@4.3
- typescript@4.4
- typescript@4.5
- typescript@4.6
- typescript@next
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: volta-cli/action@v1

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
node-version: 12.x
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: install dependencies
run: yarn install --frozen-lockfile --non-interactive

- name: test ${{ matrix.ember-try-scenario }}
run: yarn ember try:one ${{ matrix.ember-try-scenario }}
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
- name: Install Dependencies
run: pnpm install
- name: Update TS Version
run: pnpm add --save-dev ${{ matrix.typescript-scenario }}
working-directory: test-app
- name: Type checking
run: pnpm --filter test-app exec tsc --build
22 changes: 14 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,28 @@ jobs:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1

- uses: actions/cache@v2
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ci-modules-${{ hashFiles('**/yarn.lock') }}

- name: Install
run: yarn install --frozen-lockfile --non-interactive
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
run_install: true

- name: Build
run: yarn build
run: pnpm run build
working-directory: ./docs

- name: Generate Fallback Page
run: cp dist/index.html dist/404.html
working-directory: ./docs

- name: Upload to GitHub Pages
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: dist
folder: docs/dist
74 changes: 74 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Lint

on:
pull_request:
push:
branches:
- main
- master
jobs:
install_dependencies:
name: Install Dependencies
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
run_install: true

source:
name: Source
runs-on: ubuntu-latest
needs: [install_dependencies]

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
run_install: true
- name: ESLint
run: pnpm run lint:js
working-directory: ./ember-headlessui

test_app:
name: Test App
runs-on: ubuntu-latest
needs: [install_dependencies]

steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v1
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/action-setup@v2.2.1
with:
version: 6.32.1
run_install: true
- name: ESLint
run: pnpm run lint:js
working-directory: test-app
36 changes: 17 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
dist/
tmp/

# dependencies
/bower_components/
/node_modules/
node_modules/

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

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
.node_modules.ember-try/
bower.json.ember-try
package.json.ember-try

/.env
.env
Loading