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

Convert to v2 #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
26 changes: 26 additions & 0 deletions .github/actions/assert-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Assert Assets Exists
description: Build the package and assert that file contents exist as we expect
runs:
using: "composite"
steps:
- name: Build and Assert Output
shell: bash
run: |-
echo '
target: ember-scroll-modifiers/
setup:
run: pnpm build
cwd: ./ember-scroll-modifiers
# Will use once on TS
# expect: |
# dist/index.mjs
# dist/index.mjs.map

# ' >> assert-contents.config.yml
# npx assert-folder-contents

- name: Upload dist assets to cache
uses: actions/upload-artifact@v4
with:
name: dist
path: ${{ env.dist }}
10 changes: 10 additions & 0 deletions .github/actions/download-built-package/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Download built package from cache
description: Download built package from cache
runs:
using: "composite"
steps:
- name: Download built package from cache
uses: actions/download-artifact@v4
with:
name: dist
path: ${{ env.dist }}
146 changes: 101 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,73 +6,129 @@ on:
- main
- master
pull_request: {}
merge_group:
types: [checks_requested]

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

env:
CI: true
dist: ember-scroll-modifiers/dist

jobs:
test:
name: "Tests"
install_dependencies:
name: Install
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1

lint:
name: Lint
runs-on: ubuntu-latest
needs: [install_dependencies]
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: volta-cli/action@v4
- name: Install Dependencies
run: yarn install --frozen-lockfile
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- name: Lint
run: yarn lint
- name: Run Tests
run: yarn test:ember
run: pnpm lint

floating:
name: "Floating Dependencies"
build:
name: Build Tests
needs: [install_dependencies]
timeout-minutes: 5
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/assert-build

default_tests:
name: Default Tests
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: volta-cli/action@v4
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Run Tests
run: yarn test:ember
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- run: pnpm --filter test-app test:ember

try-scenarios:
floating_tests:
name: Floating Deps Test
timeout-minutes: 5
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
args: '--no-lockfile'
- uses: ./.github/actions/download-built-package
- run: pnpm i -f
- run: pnpm --filter test-app test:ember

try_scenarios:
name: ${{ matrix.try-scenario }}
timeout-minutes: 5
runs-on: ubuntu-latest
needs: "test"
timeout-minutes: 10
needs: [default_tests]

strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-test-helpers-v3
- ember-3.28
- ember-4.0.0
- ember-4.4
- ember-4.8
- ember-4.12
- ember-5.4
- ember-release
- ember-beta
- ember-canary
- embroider-safe
experimental: [false]
include:
- try-scenario: ember-beta
experimental: true
- try-scenario: ember-canary
experimental: true
- try-scenario: embroider-optimized
experimental: true
- embroider-optimized

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: volta-cli/action@v4
- name: Install Dependencies
run: yarn install --frozen-lockfile
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- uses: ./.github/actions/download-built-package
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: ./test-app
run: >-
node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
--skip-cleanup

# MeasureAssetSizes:
# name: Measure Asset Sizes
# runs-on: ubuntu-latest
# needs: build
# steps:
# - uses: actions/checkout@v4
# with:
# persist-credentials: false
# - uses: wyvox/action-setup-pnpm@v3
# with:
# node-version: 18.18.1
# - uses: ./.github/actions/download-built-package
# - name: measure asset sizes
# run: node ./dev/estimate-bytes/index.js
# - name: comment on PR
# uses: marocchino/sticky-pull-request-comment@v2
# with:
# header: asset-sizes
# path: ./dev/estimate-bytes/comment.txt
28 changes: 7 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
# 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

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

# broccoli-debug
/DEBUG/
.env*
.pnpm-debug.log
npm-debug.log*
yarn-error.log
.DS_Store
39 changes: 0 additions & 39 deletions .npmignore

This file was deleted.

14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@

* `git clone https://github.com/elwayman02/ember-scroll-modifiers`
* `cd ember-scroll-modifiers`
* `yarn install`
* `pnpm i`

## Linting

- `yarn lint`
- `yarn lint:fix`
- `pnpm lint`
- `pnpm lint:fix`

## Running tests

- `yarn test` – Runs the test suite on the current Ember version
- `yarn test:ember --server` – Runs the test suite in "watch mode"
- `yarn test:ember-compatibility` – Runs the test suite against multiple Ember versions
- `pnpm test` – Runs the test suite on the current Ember version
- `pnpm test:ember --server` – Runs the test suite in "watch mode"
- `pnpm test:ember-compatibility` – Runs the test suite against multiple Ember versions

## Running the dummy application

- `yarn start`
- `pnpm start`
- Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
1 change: 0 additions & 1 deletion app/modifiers/did-intersect.js

This file was deleted.

1 change: 0 additions & 1 deletion app/modifiers/scroll-into-view.js

This file was deleted.

28 changes: 0 additions & 28 deletions ember-cli-build.js

This file was deleted.

9 changes: 9 additions & 0 deletions ember-scroll-modifiers/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# unconventional js
/blueprints/*/files/

# compiled output
/dist/
/declarations/

# misc
/coverage/
Loading
Loading