Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Ember v5 #39

Merged
merged 8 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ on:
pull_request: {}

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

jobs:
test:
name: "Tests"
name: 'Tests'
runs-on: ubuntu-latest
timeout-minutes: 12

steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: 'lts/*'
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
Expand All @@ -32,7 +33,7 @@ jobs:
run: yarn test

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

steps:
Expand All @@ -56,10 +57,11 @@ jobs:
matrix:
try-scenario:
- ember-lts-3.28
- ember-lts-4.8
- ember-lts-4.12
- ember-release
- ember-beta
- ember-canary
- ember-classic
- embroider-safe
- embroider-optimized

Expand All @@ -73,7 +75,9 @@ jobs:
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
# Using UV_USE_IO_URING to prevent embroider-safe and embroider-optimized tests from hanging
# https://github.com/embroider-build/embroider/issues/1532
run: UV_USE_IO_URING=0 ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
working-directory: test-app

publish:
Expand All @@ -87,8 +91,7 @@ jobs:
with:
node-version: '${{ env.NODE_VERSION }}'
registry-url: 'https://registry.npmjs.org'
- run:
yarn install --frozen-lockfile
- run: yarn install --frozen-lockfile
yarn prepare
- run: npm publish
env:
Expand Down
1 change: 1 addition & 0 deletions .prettierrc.js → .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

module.exports = {
plugins: ['prettier-plugin-ember-template-tag'],
singleQuote: true,
};
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022
Copyright (c) 2023

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
20 changes: 20 additions & 0 deletions config/ember-cli-update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
"name": "@embroider/addon-blueprint",
"version": "2.7.0",
"blueprints": [
{
"name": "@embroider/addon-blueprint",
"isBaseBlueprint": true,
"options": [
"--ci-provider=github",
"--typescript",
"--yarn"
]
}
]
}
]
}
2 changes: 2 additions & 0 deletions ember-config-cat/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# compiled output
/dist/
/tmp/
/declarations/


# dependencies
/bower_components/
Expand Down
23 changes: 17 additions & 6 deletions ember-config-cat/.eslintrc.js → ember-config-cat/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,24 @@ module.exports = {
],
},
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.js',
'./.prettierrc.js',
'./.template-lintrc.js',
'./addon-main.js',
'./.eslintrc.cjs',
'./.prettierrc.cjs',
'./.template-lintrc.cjs',
'./addon-main.cjs',
],
parserOptions: {
sourceType: 'script',
Expand All @@ -42,8 +53,8 @@ module.exports = {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
plugins: ['n'],
extends: ['plugin:n/recommended'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
Expand Down
12 changes: 12 additions & 0 deletions ember-config-cat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# The authoritative copies of these live in the monorepo root (because they're
# more useful on github that way), but the build copies them into here so they
# will also appear in published NPM packages.
/README.md
/LICENSE.md

# compiled output
/dist
/declarations

# npm/pnpm/yarn pack output
*.tgz
File renamed without changes.
10 changes: 7 additions & 3 deletions ember-config-cat/babel.config.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"presets": ["@babel/preset-typescript"],
"plugins": [
["@babel/plugin-transform-typescript", { "allowDeclareFields": true }],
["@babel/plugin-transform-typescript", { "allExtensions": true, "onlyRemoveTypeImports": true, "allowDeclareFields": true }],
"@embroider/addon-dev/template-colocation-plugin",
["@babel/plugin-proposal-decorators", { "legacy": true }],
"@babel/plugin-transform-class-static-block",
["babel-plugin-ember-template-compilation", {
"targetFormat": "hbs",
"transforms": []
}],
["@babel/plugin-proposal-decorators", { "version": "legacy" }],
"@babel/plugin-proposal-class-properties"
]
}
94 changes: 64 additions & 30 deletions ember-config-cat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,83 @@
"license": "MIT",
"author": "",
"files": [
"addon-main.js",
"addon-main.cjs",
"declarations",
"dist"
],
"scripts": {
"build": "rollup --config",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"build": "concurrently 'npm:build:*'",
"build:js": "rollup --config",
"build:types": "glint --declaration",
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"start": "rollup --config --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'",
"prepare": "yarn build"
"lint:types": "glint",
"prepack": "rollup --config",
"start": "concurrently 'npm:start:*'",
"start:js": "rollup --config --watch --no-watch.clearScreen",
"start:types": "glint --declaration --watch",
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
},
"dependencies": {
"@ember/test-helpers": "^2.9.3",
"@embroider/addon-shim": "^1.8.4",
"configcat-common": "^6.0.0",
"configcat-js": "^6.0.0"
"configcat-js": "^6.0.0",
"ember-qunit": ">= 6"
},
"devDependencies": {
"@babel/core": "^7.20.7",
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.20.7",
"@babel/plugin-syntax-decorators": "^7.17.0",
"@babel/preset-typescript": "^7.18.6",
"@embroider/addon-dev": "^3.0.0",
"@types/ember__component": "^4.0.11",
"@types/ember__debug": "^4.0.3",
"@types/ember__destroyable": "^4.0.1",
"@types/ember__engine": "^4.0.4",
"@types/ember__runloop": "^4.0.2",
"@types/ember__service": "^4.0.2",
"@babel/plugin-transform-class-static-block": "^7.20.0",
"@babel/plugin-transform-typescript": "^7.22.15",
"@babel/runtime": "^7.17.0",
"@embroider/addon-dev": "^4.1.0",
"@glint/core": "^1.2.0",
"@glint/environment-ember-loose": "^1.2.0",
"@glint/environment-ember-template-imports": "^1.2.0",
"@glint/template": "^1.2.0",
"@rollup/plugin-babel": "^6.0.3",
"@tsconfig/ember": "^2.0.0",
"@types/ember": "^4.0.4",
"@types/ember__application": "^4.0.6",
"@types/ember__array": "^4.0.4",
"@types/ember__component": "^4.0.14",
"@types/ember__controller": "^4.0.5",
"@types/ember__debug": "^4.0.4",
"@types/ember__engine": "^4.0.5",
"@types/ember__error": "^4.0.3",
"@types/ember__helper": "^4.0.3",
"@types/ember__modifier": "^4.0.6",
"@types/ember__object": "^4.0.6",
"@types/ember__owner": "^4.0.4",
"@types/ember__polyfills": "^4.0.2",
"@types/ember__routing": "^4.0.13",
"@types/ember__runloop": "^4.0.3",
"@types/ember__service": "^4.0.3",
"@types/ember__string": "^3.16.3",
"@types/ember__template": "^4.0.1",
"@types/ember__test": "^4.0.1",
"@types/ember__utils": "^4.0.2",
"@types/ember__template": "^4.0.2",
"@types/ember__test": "^4.0.2",
"@types/ember__utils": "^4.0.3",
"@types/qunit": "^2.19.6",
"babel-plugin-ember-template-compilation": "^2.2.0",
"concurrently": "^8.0.1",
"ember-cli-htmlbars": "^6.1.1",
"ember-template-lint": "^5.3.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-ember": "^11.3.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"npm-run-all": "^4.1.5",
"rollup": "2.79.1",
"rollup-plugin-ts": "^3.0.2"
"eslint-plugin-n": "^16.1.0",
"eslint-plugin-prettier": "^5.0.0",
"prettier-plugin-ember-template-tag": "^1.1.0",
"rollup": "^3.21.8",
"rollup-plugin-copy": "^3.4.0",
"typescript": "^5.0.4"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand All @@ -68,7 +97,7 @@
"ember-addon": {
"version": 2,
"type": "addon",
"main": "addon-main.js",
"main": "addon-main.cjs",
"app-js": {
"./helpers/get-flag-value.js": "./dist/_app_/helpers/get-flag-value.js",
"./helpers/has-flag-value.js": "./dist/_app_/helpers/has-flag-value.js",
Expand All @@ -77,15 +106,20 @@
}
},
"exports": {
".": "./dist/index.js",
"./*": "./dist/*",
"./addon-main.js": "./addon-main.js",
"./test-support": "./dist/test-support.js"
".": {
"types": "./declarations/index.d.ts",
"default": "./dist/index.js"
},
"./*": {
"types": "./declarations/*.d.ts",
"default": "./dist/*.js"
},
"./addon-main.js": "./addon-main.cjs"
},
"typesVersions": {
"*": {
"*": [
"dist/*"
"declarations/*"
]
}
}
Expand Down
Loading