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

Convert to single-workspace monorepo #1356

Merged
merged 7 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
3 changes: 3 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
- name: install dependencies
run: yarn install --frozen-lockfile
- name: test
working-directory: addon
run: node_modules/.bin/ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup

types:
Expand All @@ -82,6 +83,8 @@ jobs:
- name: install dependencies
run: yarn install --frozen-lockfile
- name: install TS version
working-directory: addon
run: yarn install --dev typescript@${{matrix.ts-version}}
- name: test types
working-directory: addon
run: yarn lint:ts
42 changes: 21 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
dist/
tmp/

# dependencies
/bower_components/
/node_modules/
bower_components/
node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log
.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
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
.node_modules.ember-try/
bower.json.ember-try
npm-shrinkwrap.json.ember-try
package.json.ember-try
package-lock.json.ember-try
yarn.lock.ember-try

# broccoli-debug
/DEBUG/
DEBUG/

# tyescript related output files
addon-test-support/**/*.js
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { macroCondition, dependencySatisfies } from '@embroider/macros';
import type { ComponentLike } from '@glint/template';

import getComponentManager from './get-component-manager';

Expand All @@ -10,7 +11,10 @@ import getComponentManager from './get-component-manager';
* @param {Object} owner Owner, we need this for old versions of getComponentManager
* @returns {boolean} True if it's a component, false if not
*/
function isComponent(maybeComponent: object, owner: object): boolean {
function isComponent(
maybeComponent: object,
owner: object
): maybeComponent is ComponentLike {
if (macroCondition(dependencySatisfies('ember-source', '>=3.25.0-beta.1'))) {
return !!getComponentManager(maybeComponent, owner);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const MOUSE_EVENT_CONSTRUCTOR = (() => {
const DEFAULT_EVENT_OPTIONS = { bubbles: true, cancelable: true };

export const KEYBOARD_EVENT_TYPES = tuple('keydown', 'keypress', 'keyup');
export type KeyboardEventType = typeof KEYBOARD_EVENT_TYPES[number];
export type KeyboardEventType = (typeof KEYBOARD_EVENT_TYPES)[number];

// eslint-disable-next-line require-jsdoc
export function isKeyboardEventType(
Expand All @@ -40,15 +40,16 @@ const MOUSE_EVENT_TYPES = tuple(
'mouseout',
'mouseover'
);
export type MouseEventType = typeof MOUSE_EVENT_TYPES[number];
export type MouseEventType = (typeof MOUSE_EVENT_TYPES)[number];

// eslint-disable-next-line require-jsdoc
export function isMouseEventType(eventType: any): eventType is MouseEventType {
return MOUSE_EVENT_TYPES.indexOf(eventType) > -1;
}

const FILE_SELECTION_EVENT_TYPES = tuple('change');
export type FileSelectionEventType = typeof FILE_SELECTION_EVENT_TYPES[number];
export type FileSelectionEventType =
(typeof FILE_SELECTION_EVENT_TYPES)[number];

// eslint-disable-next-line require-jsdoc
export function isFileSelectionEventType(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
158 changes: 158 additions & 0 deletions addon/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"name": "@ember/test-helpers",
"version": "2.9.0",
"description": "Helpers for testing Ember.js applications",
"keywords": [
"ember-addon"
],
"homepage": "https://github.com/emberjs/ember-test-helpers#readme",
"bugs": {
"url": "https://github.com/emberjs/ember-test-helpers/issues"
},
"repository": "https://github.com/emberjs/ember-test-helpers",
"license": "(MIT OR Apache-2.0)",
"contributors": [
"Dan Gebhardt",
"Robert Jackson",
"Stefan Penner",
"Ryan Florence",
"Adolfo Builes"
],
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"build:types": "tsc --project types.tsconfig.json",
"build:js": "yarn babel --extensions '.ts' --presets @babel/preset-typescript addon-test-support --out-dir addon-test-support/ --ignore '**/*.d.ts'",
"build": "concurrently \"npm:build:*\" --names \"build:\"",
"prepack": "cp ../README.md ./ && yarn build",
"postpack": "rimraf addon-test-support/**/*.js public-types",
"clean": "git clean -x -f",
"docs": "yarn build && documentation build --document-exported \"addon-test-support/@ember/test-helpers/index.js\" --config documentation.yml --markdown-toc-max-depth 3 -f md -o API.md",
"lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"",
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
"lint:js": "eslint --cache .",
"lint:js:fix": "eslint . --fix",
"lint:ts": "tsc --noEmit && tsc --noEmit --project type-tests",
"postpublish": "yarn clean",
"release": "release-it",
"start": "ember serve",
"test": "ember test",
"test:all": "ember try:each"
},
"peerDependencies": {
"ember-source": "^4.0.0"
},
"dependencies": {
"@ember/test-waiters": "^3.0.2",
"@embroider/macros": "^1.10.0",
"@embroider/util": "^1.9.0",
"broccoli-debug": "^0.6.5",
"broccoli-funnel": "^3.0.8",
"ember-auto-import": "^2.6.0",
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^6.2.0"
},
"devDependencies": {
"@babel/cli": "^7.20.7",
"@babel/core": "^7.21.0",
"@babel/preset-typescript": "^7.21.0",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@glimmer/component": "^1.1.2",
"@glimmer/interfaces": "^0.84.1",
"@glimmer/reference": "^0.84.2",
"@glint/template": "^0.9.7",
"@tsconfig/ember": "^1.0.1",
"@types/jquery": "^3.5.16",
"@types/rsvp": "^4.0.4",
"@typescript-eslint/eslint-plugin": "^4.33.0",
"@typescript-eslint/parser": "^4.33.0",
"broccoli-babel-preset-typescript": "^1.0.1",
"broccoli-merge-trees": "^4.2.0",
"concurrently": "^7.6.0",
"documentation": "^14.0.1",
"ember-cli": "~4.9.2",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-test-loader": "^3.0.0",
"ember-fetch": "^8.1.2",
"ember-in-element-polyfill": "^1.0.1",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator-for-testing": "^1.0.0",
"ember-resolver": "^9.0.1",
"ember-source": "~4.9.2",
"ember-source-channel-url": "^3.0.0",
"ember-try": "^2.0.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-disable-features": "^0.1.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.2.1",
"expect-type": "^0.15.0",
"fs-extra": "^11.1.0",
"latest-version": "^5.0.0",
"loader.js": "^4.7.0",
"pretender": "^3.4.7",
"prettier": "^2.8.1",
"qunit": "^2.19.4",
"release-it": "~15.6.0",
"release-it-lerna-changelog": "^5.0.0",
"rimraf": "^3.0.2",
"typescript": "^4.7.4",
"webpack": "^5.75.0"
},
"engines": {
"node": "16.* || >= 18"
},
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"changelog": {
"repo": "emberjs/ember-test-helpers",
"labels": {
"breaking": ":boom: Breaking Change",
"enhancement": ":rocket: Enhancement",
"bug": ":bug: Bug Fix",
"documentation": ":memo: Documentation",
"internal": ":house: Internal"
}
},
"ember": {
"edition": "octane"
},
"ember-addon": {
"configPath": "tests/dummy/config"
},
"release-it": {
"scripts": {
"after:bump": "yarn docs"
},
"plugins": {
"release-it-lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
},
"volta": {
"node": "16.19.0",
NullVoxPopuli marked this conversation as resolved.
Show resolved Hide resolved
"yarn": "1.22.19"
},
"typesVersions": {
"*": {
"*": [
"public-types/@ember/test-helpers/*"
]
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
} from '@ember/test-helpers';
import { buildWaiter } from '@ember/test-waiters';
import GlimmerComponent from '@glimmer/component';
// Eslint 7 / babel-parser stopped supporting decorators
// eslint-disable-next-line no-unused-vars
import { tracked } from '@glimmer/tracking';
import { hbs } from 'ember-cli-htmlbars';
import { module, test } from 'qunit';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { setResolverRegistry } from '../helpers/resolver';
import { hbs } from 'ember-cli-htmlbars';
import { precompileTemplate } from '@ember/template-compilation';
import { defer } from 'rsvp';
// Eslint 7 / babel-parser stopped supporting decorators
// eslint-disable-next-line no-unused-vars
import { tracked } from '@glimmer/tracking';

const PromiseWrapperTemplate = hbs`
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading