Skip to content

Commit

Permalink
feat: initial implementation
Browse files Browse the repository at this point in the history
BREAKING CHANGE: implement default helper manager polyfill
  • Loading branch information
NullVoxPopuli committed Nov 14, 2021
1 parent 226b9c7 commit 2caf6dc
Show file tree
Hide file tree
Showing 50 changed files with 15,346 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2

[*.hbs]
insert_final_newline = false

[*.{diff,md}]
trim_trailing_whitespace = false
9 changes: 9 additions & 0 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false
}
22 changes: 22 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
6 changes: 6 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'use strict';

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

// accommodates: JS, TS, App, and Addon
module.exports = configs.ember();
100 changes: 100 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// Docs:
// https://docs.renovatebot.com/configuration-options/
{
"extends": [
"config:base",
":semanticCommits"
],
"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
//
// This reduces overall PR count
////////////////////////////////////////
{
"groupName": "Type Definitions",
"packagePatterns": ["^@types\/*"],
"schedule": ["after 9pm on sunday"],
},
{
"groupName": "Lint Dependencies",
"schedule": ["after 9pm on sunday"],
"packageNames": [
"eslint",
"babel-eslint",
"ember-template-lint",
"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"
]
},
{
// changing peerDependencies *at all* is a breaking change
"matchDepTypes": ["peerDependencies"],
"enabled": false
},
{
// changing engines forces other people to need to upgrade their minimum node
// therefor engine changes are breaking changes
"depTypeList": ["engines"],
"enabled": false

}
]
}
118 changes: 118 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: CI

on:
pull_request:
push:
branches:
- main
- master
schedule:
- cron: "0 3 * * 0" # every Sunday at 3am

env:
CI: true

jobs:
tests:
name: Base Tests
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
node:
- "14"
- "16"
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node }}

- run: yarn install --frozen-lockfile

- name: Test with ${{ matrix.node }}
run: yarn ember test

floating-dependencies:
name: Floating Dependencies
timeout-minutes: 5
runs-on: ubuntu-latest
strategy:
matrix:
node:
- "14"
- "16"

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: ${{ matrix.node }}

- run: yarn install --no-lockfile

- name: Test with Node ${{ matrix.node }}
run: yarn ember test

try-scenarios:
name: "Compatibility"
timeout-minutes: 7
runs-on: ubuntu-latest
needs: tests

strategy:
fail-fast: true
matrix:
ember-try-scenario:
- ember-3.25
- ember-3.28-lts
- ember-release
- ember-beta
- ember-canary
- ember-could-get-used-to-this
- embroider-safe
- embroider-optimized
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
with:
node-version: 14.x
- name: install dependencies
run: yarn install --frozen-lockfile
- name: test
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup

ember-cli-update:
if: github.event_name == 'pull_request' && github.event.pusher.name == 'renovate-bot'
runs-on: ubuntu-latest
needs: [tests, try-scenarios, floating-dependencies]

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.ECU_TOKEN }}
- uses: actions/setup-node@v2
- uses: kellyselden/ember-cli-update-action@v3
with:
autofix_command: yarn lint:fix
ignore_to: true

publish:
name: Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
needs: [tests, try-scenarios, floating-dependencies]

steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: volta-cli/action@v1
- run: yarn install

- name: Release
run: yarn semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88 changes: 88 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Lint

# based on:
# - https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/blob/master/.github/workflows/lint.yml
# - https://github.com/NullVoxPopuli/ember-autostash-modifier/blob/master/.github/workflows/ci.yml
# - https://github.com/emberjs/ember-test-helpers/blob/master/.github/workflows/ci-build.yml
on:
pull_request:
push:
# filtering branches here prevents duplicate builds from pull_request and push
branches:
- main

env:
CI: true

jobs:
source:
name: Source
runs-on: ubuntu-latest

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

- run: yarn install --frozen-lockfile

- name: ESLint
run: yarn lint:js

- name: Templates
run: yarn lint:hbs

tooling:
name: Tooling
runs-on: ubuntu-latest
needs: [install_dependencies]

steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v1
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}

- name: Semantic Release
run: yarn semantic-release --dry-run
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# docs:
# if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
# name: Docs
# runs-on: ubuntu-latest

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

# - run: yarn install
# - run: yarn lint:docs


# docs-js-code:
# if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
# name: Docs (JS Code Samples)
# runs-on: ubuntu-latest

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

# - run: yarn install
# - run: yarn lint:docs-js

commits:
name: Commit Messages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: volta-cli/action@v1
- uses: wagoid/[email protected]
29 changes: 29 additions & 0 deletions .github/workflows/types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Types

# based on:
# - https://github.com/NullVoxPopuli/eslint-plugin-decorator-position/blob/master/.github/workflows/lint.yml
# - https://github.com/NullVoxPopuli/ember-autostash-modifier/blob/master/.github/workflows/ci.yml
# - https://github.com/emberjs/ember-test-helpers/blob/master/.github/workflows/ci-build.yml
on:
pull_request:
push:
# filtering branches here prevents duplicate builds from pull_request and push
branches:
- main

env:
CI: true

jobs:
types:
name: Type Checking
runs-on: ubuntu-latest

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

- run: yarn install --frozen-lockfile

- name: Type Checking
run: yarn prepack
Loading

0 comments on commit 2caf6dc

Please sign in to comment.