Skip to content

Commit

Permalink
Convert to (Native™ (Real™) Package™)™
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Mar 4, 2024
1 parent fae32d2 commit 224b3c8
Show file tree
Hide file tree
Showing 78 changed files with 7,534 additions and 14,481 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.

85 changes: 85 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
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: 8
- uses: actions/setup-node@v4
with:
node-version: 18
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: 8
- uses: actions/setup-node@v4
with:
node-version: 18
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'
- 'beta'
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
- 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
33 changes: 33 additions & 0 deletions .github/workflows/push-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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/[email protected]
with:
branch: dist
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: 'ember-string'
Loading

0 comments on commit 224b3c8

Please sign in to comment.