Skip to content

Commit

Permalink
Merge pull request #1173 from NullVoxPopuli/update-ember-try
Browse files Browse the repository at this point in the history
Update ember-try config (support unchanged)
  • Loading branch information
NullVoxPopuli authored Jan 3, 2025
2 parents c3f0df3 + f0cb33f commit eb07aa6
Show file tree
Hide file tree
Showing 33 changed files with 18,832 additions and 832 deletions.
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- uses: ./.github/actions/assert-build


typecheck:
typecheck_legacy:
name: '${{ matrix.typescript-scenario }}'
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -66,9 +66,50 @@ jobs:
- typescript@4.8
- typescript@4.9
- typescript@5.0

steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 18.18.1
- name: 'Build'
run: pnpm build
- name: 'Change TS to ${{ matrix.typescript-scenario }}'
run: 'pnpm add --save-dev ${{ matrix.typescript-scenario}}'
working-directory: ./test-app

# This has been really annoying
# due to injected dependencies :(
- name: 'Re-sync injected dependencies'
run: pnpm i -f
- name: 'Print Versions'
run: |
pnpm --filter "test-app*" exec tsc -v;
pnpm --filter "test-app*" exec glint --version;
- name: 'Type checking (built in types)'
run: pnpm --filter "test-app-old-ts" exec glint;

# - name: 'Type checking (DefinitelyTyped types)'
# run: pnpm --filter "test-app-definitely-typed" exec glint;

typecheck:
name: '${{ matrix.typescript-scenario }}'
runs-on: ubuntu-latest
timeout-minutes: 5
needs: [build]
continue-on-error: true
strategy:
fail-fast: true
matrix:
typescript-scenario:
- typescript@5.1
- typescript@5.2
- typescript@5.3
- typescript@5.4
- typescript@5.5
- typescript@5.6
- typescript@5.7

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ packages:
- "codemod"
- "docs"
- "test-app"
- "test-app-old-ts"
- "test-app-definitely-typed"
- "dev/*"
19 changes: 19 additions & 0 deletions test-app-old-ts/.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 test-app-old-ts/.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
}
23 changes: 23 additions & 0 deletions test-app-old-ts/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# unconventional js
/blueprints/*/files/
/vendor/
/public/

# 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
54 changes: 54 additions & 0 deletions test-app-old-ts/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

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

const config = configs.ember();

module.exports = {
...config,
overrides: [
...config.overrides,
{
files: ['**/*.gts'],
plugins: ['ember'],
parser: 'ember-eslint-parser',
globals: {
// used in testing as a shorthand for <output>
out: true,
},
},
{
files: ['**/*.gjs'],
plugins: ['ember'],
parser: 'ember-eslint-parser',
},
{
files: ['**/*.{ts,gts}'],
rules: {
/**
* This one is incorrectly parsed for now, because
* the rule doesn't understand decorators
*/
'@typescript-eslint/no-unused-vars': 'off',

/**
* any can be useful
*/
'@typescript-eslint/no-explicit-any': 'off',

/**
* Some compiler errors are not helpful
*/
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description',
'ts-nocheck': 'allow-with-description',
'ts-check': 'allow-with-description',
'ts-expect-error': 'allow-with-description',
},
],
},
},
],
};
26 changes: 26 additions & 0 deletions test-app-old-ts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
26 changes: 26 additions & 0 deletions test-app-old-ts/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# unconventional js
/blueprints/*/files/
/vendor/
/public/
*.yaml
*.md
*.yml

# compiled output
/dist/
/tmp/
CHANGELOG.md

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/package.json.ember-try
30 changes: 30 additions & 0 deletions test-app-old-ts/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
'use strict';

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
printWidth: 100,
singleQuote: true,
templateSingleQuote: false,
// this was required to make the VSCode + Prettier work correctly with <template>, see https://github.com/gitKrystan/prettier-plugin-ember-template-tag/issues/38
// we should roll this back once that issue has been fixed!
overrides: [
{
files: '*.hbs',
options: {
singleQuote: false,
},
},
{
files: '*.gjs',
options: {
parser: 'ember-template-tag',
},
},
{
files: '*.gts',
options: {
parser: 'ember-template-tag',
},
},
],
};
14 changes: 14 additions & 0 deletions test-app-old-ts/.template-lintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

module.exports = {
extends: 'recommended',
overrides: [
{
files: ['**/*.gjs', '**/*.gts'],
rules: {
'no-curly-component-invocation': 'off',
'no-implicit-this': 'off',
},
},
],
};
3 changes: 3 additions & 0 deletions test-app-old-ts/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
}
1 change: 1 addition & 0 deletions test-app-old-ts/app
3 changes: 3 additions & 0 deletions test-app-old-ts/config/dependency-lint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

module.exports = {};
6 changes: 6 additions & 0 deletions test-app-old-ts/config/deprecation-workflow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* eslint-disable no-undef */
self.deprecationWorkflow = self.deprecationWorkflow || {};
self.deprecationWorkflow.config = {
throwOnUnhandled: true,
workflow: [],
};
18 changes: 18 additions & 0 deletions test-app-old-ts/config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "ember-cli",
"version": "3.28.3",
"blueprints": [
{
"name": "app",
"outputRepo": "https://github.com/ember-cli/ember-new-output",
"codemodsSource": "ember-app-codemods-manifest@1",
"isBaseBlueprint": true,
"options": ["--yarn"]
}
]
}
]
}
Loading

0 comments on commit eb07aa6

Please sign in to comment.