Skip to content

Commit

Permalink
V2 Addon
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jul 23, 2023
1 parent 7f0f652 commit 9cdb9b8
Show file tree
Hide file tree
Showing 112 changed files with 9,807 additions and 4,789 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["test-app", "@nullvoxpopuli/dev"]
}
5 changes: 5 additions & 0 deletions .changeset/v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ember-query-params-service": major
---

convert to a v2 addon, so this library now requires consumers to have ember-auto-import@v2+
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

root = true


[*]
end_of_line = lf
charset = utf-8
Expand Down
9 changes: 0 additions & 9 deletions .ember-cli

This file was deleted.

20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

77 changes: 12 additions & 65 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
// Docs:
// https://docs.renovatebot.com/configuration-options/
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":semanticCommits"
"config:base"
],
"automerge": true,
"masterIssue": true,
"rangeStrategy": "bump",
// From the docs:
// https://docs.renovatebot.com/configuration-options/#packagerules
// Important to know: Renovate will evaluate all packageRules and not stop once it gets a first match.
// Therefore, you should order your packageRules in order of importance so that later rules can override
// settings from earlier rules if necessary.
//
// (so if something is to be disabled, place that rule last)
"packageRules": [
////////////////////////////////////////
// Grouping namespaced packages together
Expand All @@ -24,7 +14,7 @@
{
"groupName": "Type Definitions",
"packagePatterns": ["^@types\/*"],
"schedule": ["after 9pm on sunday"],
"schedule": ["after 9pm on sunday"]
},
{
"groupName": "Lint Dependencies",
Expand All @@ -36,65 +26,22 @@
"prettier"
],
"packagePatterns": [
"eslint-plugin-.*",
"eslint-config-.*",
".*typescript-eslint.*",
"^@commitlint\/*",
"^remark-*"
]
},
// These are dependencies that come default when
// generating a new ember addon
{
"groupName": "Framework Dependencies",
"packageNames": [
"@ember/optional-features",
"@glimmer/component",
"@glimmer/tracking",
"ember-disable-prototype-extensions",
"ember-export-application-global",
"ember-load-initializers",
"ember-maybe-import-regenerator",
"ember-resolver",
"ember-source",
"ember-cli-page-title"
]
},
{
"groupName": "CLI Dependencies",
"packageNames": [
"broccoli-asset-rev",
"ember-cli",
"ember-auto-import",
"ember-cli-dependency-checker",
"ember-cli-inject-live-reload",
"ember-cli-sri",
"ember-cli-terser"
]
},
{
"groupName": "Testing Dependencies",
"schedule": ["after 9pm on sunday"],
"packageNames": [
"qunit-dom",
"ember-try",
"ember-source-channel-url",
"ember-qunit",
"qunit",
"npm-run-all"
]
"eslint.*",
".*eslint.*",
"prettier.*",
"stylelint.*"
],
},
{
// changing peerDependencies *at all* is a breaking change
"matchDepTypes": ["peerDependencies"],
"enabled": false
},

// Upgrading to ember-auto-import@v2 in dependencies
// forces a breaking change
{
"matchPackageNames": ["ember-auto-import"],
// ensure maximum compatibility, when possible
"matchPaths": ["ember-primitives/package.json"],
"matchDepTypes": ["dependencies"],
"enabled": false
}
},
]
}
188 changes: 188 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

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

env:
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: this-is-not-a-secret
TURBO_TEAM: myself

jobs:
setup:
name: 'Setup'
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
pending: ${{ steps.set-pending.outputs.pending }}
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- id: set-pending
run: echo "pending=$(./cache-status.sh)" >> $GITHUB_OUTPUT

# Every PR will need linting. Turbo's cache can optimize per-package
lint:
name: Lint
runs-on: ubuntu-latest
needs: [setup]
timeout-minutes: 5
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm lint


test:
name: "Default Tests"
runs-on: ubuntu-latest
needs: [setup]
timeout-minutes: 5
if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm turbo test --filter test-app

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 5
if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pnpm-args: --no-lockfile
- run: pnpm build
- run: pnpm i -f
- run: pnpm turbo test --filter test-app

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: [test]
timeout-minutes: 10
if: ${{ fromJSON(needs.setup.outputs.pending).test-app.test.status == 'MISS' }}
strategy:
fail-fast: false
matrix:
try-scenario:
- "ember-3.13"
- "ember-3.14"
- "ember-3.16"
- "ember-3.18"
- "ember-3.20"
- "ember-3.24"
- "ember-3.28"
- "ember-4.4"
- "ember-4.8"
- "ember-4.12"
- "ember-5.0"
- ember-release
- ember-beta
- ember-canary

steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }} --skip-cleanup
working-directory: test-app

# NOTE: Docs' types don't need checking because we check types in the
# Lint phase up above
# This job is for checking specific versions of typescript
typecheck:
name: '${{ matrix.typescript-scenario }}'
runs-on: ubuntu-latest
if: ${{ fromJSON(needs.setup.outputs.pending).test-app['lint:types'].status == 'MISS' }}
timeout-minutes: 5
needs: [test]
continue-on-error: true
strategy:
fail-fast: true
matrix:
typescript-scenario:
- typescript@4.8
- typescript@4.9
- typescript@5.0
- typescript@5.1
- typescript@rc
- typescript@next

steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f
- name: 'Change TS to ${{ matrix.typescript-scenario }}'
run: 'pnpm add --save-dev ${{ matrix.typescript-scenario}}'
working-directory: ./test-app
- name: 'Type checking'
run: pnpm turbo --filter 'test-app' lint:types

docs-tests:
name: "Docs' Tests"
if: ${{ fromJSON(needs.setup.outputs.pending).docs-app.test.status == 'MISS' }}
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [setup]
steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm i -f
- run: pnpm test --filter docs-app

DeployProduction:
name: "Deploy: Production"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [setup]
strategy:
matrix:
app:
- { path: "./docs-app/dist", cloudflareName: "ember-primitives", name: "docs" }


permissions:
contents: read
deployments: write

steps:
- uses: wyvox/action@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: pnpm build
- run: pnpm ember build
working-directory: docs-app
- name: Publish ${{ matrix.app.id }}
uses: cloudflare/pages-action@v1.4.1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ matrix.app.cloudflareName }}
directory: ${{ matrix.app.path }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}


23 changes: 23 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Push dist

on:
push:
branches:
- main
- master

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
- uses: NullVoxPopuli/action-setup-pnpm@v2.1.0
- uses: kategengler/put-built-npm-package-contents-on-branch@v1.0.0
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ember-primitives
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://github.com/changesets/action
# https://github.com/changesets/action
name: Release

on:
Expand Down
Loading

0 comments on commit 9cdb9b8

Please sign in to comment.