Skip to content

Commit

Permalink
Merge pull request #425 from NullVoxPopuli/real-package
Browse files Browse the repository at this point in the history
(Real™ package™)™
  • Loading branch information
ef4 authored Jul 2, 2024
2 parents fae32d2 + c10c159 commit 16a5a0e
Show file tree
Hide file tree
Showing 78 changed files with 8,913 additions and 14,486 deletions.
3 changes: 3 additions & 0 deletions .attw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignoreRules": ["cjs-resolves-to-esm"]
}
9 changes: 0 additions & 9 deletions .ember-cli

This file was deleted.

17 changes: 1 addition & 16 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/
/declarations/

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

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


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

module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: ['ember'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
overrides: [
// ts files
{
files: ['**/*.ts', '**/*.gts'],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
// Add any custom rules here
},
},
// node files
{
files: [
'./.eslintrc.cjs',
'./.prettierrc.cjs',
'./.template-lintrc.cjs',
'./addon-main.cjs',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['n'],
extends: ['plugin:n/recommended'],
},
{
files: ['./tests/type-tests/**'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
},
},
],
};
55 changes: 0 additions & 55 deletions .eslintrc.js

This file was deleted.

122 changes: 0 additions & 122 deletions .github/workflows/ci-build.yml

This file was deleted.

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

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

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

jobs:
test:
name: "Tests"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Lint
run: pnpm lint
- name: Run Tests
run: pnpm test

floating:
name: "Floating Dependencies"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: pnpm
- name: Install Dependencies
run: pnpm install --no-lockfile
- run: pnpm build
- name: Run Tests
run: pnpm test

types-scenarios:
name: "Types: ${{ matrix.tsVersion }}"
runs-on: ubuntu-latest
needs: test

strategy:
matrix:
tsVersion:
- '~5.0'
- '~5.1'
- '~5.2'
- '~5.3'
- '~5.4'
- '~5.5'
- 'beta'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- uses: actions/setup-node@v4
with:
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Swap TS Version
run: pnpm add --save-dev typescript@${{ matrix.tsVersion }} --workspace-root
- name: Check Types
run: |
pnpm tsc -v
pnpm test:types
32 changes: 32 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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
# (configurable via the "branch" option below)
name: Push dist

on:
push:
branches:
- main
- master

jobs:
push-dist:
name: Push dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
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 }}
Loading

0 comments on commit 16a5a0e

Please sign in to comment.