diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3fbc0fb8..ba4fadd7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,8 +14,8 @@ concurrency:
cancel-in-progress: true
jobs:
- lint:
- name: Lint
+ lint-addon:
+ name: Lint Addon
runs-on: ubuntu-latest
timeout-minutes: 20
@@ -27,9 +27,26 @@ jobs:
cache: yarn
- run: yarn install --frozen-lockfile
+
+ - name: Lint
+ run: yarn workspace ember-cookies run lint
+
+ lint-test-app:
+ name: Lint Test App
+ runs-on: ubuntu-latest
+ timeout-minutes: 20
+
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 12.x
+ cache: yarn
+
+ - run: yarn install --frozen-lockfile
+
- name: Lint
- run: yarn lint:js
- working-directory: packages/ember-cookies
+ run: yarn workspace test-app run lint
tests:
name: Tests
@@ -67,7 +84,7 @@ jobs:
- name: tests
run: yarn test:one ${{ matrix.test-suite }}
continue-on-error: ${{matrix.allow-failure}}
- working-directory: packages/ember-cookies
+ working-directory: packages/test-app
extra-tests:
name: Tests (Floating Dependencies)
@@ -86,4 +103,4 @@ jobs:
- name: tests
run: yarn test
continue-on-error: true
- working-directory: packages/ember-cookies
+ working-directory: packages/test-app
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..b15a28f3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+# See https://help.github.com/ignore-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+
+# misc
+npm-debug.log*
+yarn-error.log
diff --git a/package.json b/package.json
index 6f987da1..ee19f4e2 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,20 @@
{
"version": "0.5.2",
"private": true,
+ "repository": "https://github.com/simplabs/ember-cookies",
+ "license": "MIT",
"workspaces": [
"packages/*"
],
- "repository": "https://github.com/simplabs/ember-cookies"
+ "scripts": {
+ "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"",
+ "lint:addon": "yarn workspace ember-cookies run lint",
+ "lint:test-app": "yarn workspace test-app run lint",
+ "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:fix:*",
+ "lint:fix:addon": "yarn workspace ember-cookies run lint:fix",
+ "lint:fix:test-app": "yarn workspace test-app run lint:fix"
+ },
+ "devDependencies": {
+ "npm-run-all": "^4.1.5"
+ }
}
\ No newline at end of file
diff --git a/packages/ember-cookies/.eslintrc.js b/packages/ember-cookies/.eslintrc.js
index 90865331..1c69472c 100644
--- a/packages/ember-cookies/.eslintrc.js
+++ b/packages/ember-cookies/.eslintrc.js
@@ -24,15 +24,11 @@ module.exports = {
'.eslintrc.js',
'**/.eslintrc.js',
'.prettierrc.js',
- '.template-lintrc.js',
- 'ember-cli-build.js',
'index.js',
- 'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
- 'tests/dummy/config/**/*.js',
],
- excludedFiles: ['addon/**', 'addon-test-support/**', 'app/**', 'tests/dummy/app/**'],
+ excludedFiles: ['addon/**', 'addon-test-support/**'],
parserOptions: {
sourceType: 'script',
},
@@ -43,12 +39,5 @@ module.exports = {
plugins: ['node'],
extends: ['plugin:node/recommended'],
},
- // test files
- {
- files: ['tests/**/*-test.js'],
- excludedFiles: ['tests/dummy/**'],
- plugins: ['qunit'],
- extends: ['plugin:qunit/recommended'],
- },
],
};
diff --git a/packages/ember-cookies/ember-cli-build.js b/packages/ember-cookies/ember-cli-build.js
deleted file mode 100644
index 6f5c605d..00000000
--- a/packages/ember-cookies/ember-cli-build.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/* eslint-env node */
-const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
-
-module.exports = function (defaults) {
- let app = new EmberAddon(defaults, {
- // Add options here
- });
-
- /*
- This build file specifies the options for the dummy test app of this
- addon, located in `/tests/dummy`
- This build file does *not* influence how the addon or the app using it
- behave. You most likely want to be modifying `./index.js` or app's build file
- */
-
- const { maybeEmbroider } = require('@embroider/test-setup');
- return maybeEmbroider(app);
-};
diff --git a/packages/ember-cookies/package.json b/packages/ember-cookies/package.json
index 3a356c72..e0baac85 100644
--- a/packages/ember-cookies/package.json
+++ b/packages/ember-cookies/package.json
@@ -13,13 +13,9 @@
},
"repository": "https://github.com/simplabs/ember-cookies",
"scripts": {
- "build": "ember build",
+ "lint": "yarn lint:js",
"lint:js": "eslint . --cache",
- "nodetest": "node node-tests/runner.js",
- "start": "ember server",
- "test": "ember test",
- "test:all": "ember try:each",
- "test:one": "ember try:one"
+ "lint:js:fix": "eslint . --fix"
},
"dependencies": {
"ember-cli-babel": "^7.26.3",
@@ -27,49 +23,12 @@
},
"devDependencies": {
"@babel/eslint-parser": "^7.17.0",
- "@ember/optional-features": "^2.0.0",
- "@ember/test-helpers": "^2.5.0",
- "@embroider/test-setup": "1.6.0",
- "@glimmer/component": "^1.0.4",
- "@glimmer/tracking": "^1.0.4",
- "broccoli-asset-rev": "^3.0.0",
- "chai": "^4.1.0",
- "ember-auto-import": "^2.4.0",
- "ember-cli": "~4.3.0",
- "ember-cli-chai": "^0.5.0",
- "ember-cli-dependency-checker": "^3.2.0",
- "ember-cli-fastboot": "^3.2.0-beta.4",
- "ember-cli-fastboot-testing": "^0.6.0",
- "ember-cli-htmlbars": "^6.0.0",
- "ember-cli-inject-live-reload": "^2.0.2",
- "ember-cli-sri": "^2.1.1",
- "ember-cli-terser": "^4.0.1",
- "ember-disable-prototype-extensions": "^1.1.3",
- "ember-export-application-global": "^2.0.1",
- "ember-load-initializers": "^2.1.2",
- "ember-maybe-import-regenerator": "^1.0.0",
- "ember-page-title": "^7.0.0",
- "ember-qunit": "^5.1.5",
- "ember-resolver": "^8.0.2",
- "ember-sinon": "5.0.0",
- "ember-source": "~4.4.0",
- "ember-source-channel-url": "^3.0.0",
- "ember-try": "^2.0.0",
"eslint": "^8.0.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-ember": "^10.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
- "eslint-plugin-qunit": "^7.2.0",
- "glob": "^8.0.0",
- "loader.js": "^4.7.0",
- "npm-run-all": "^4.1.5",
- "prettier": "2.6.2",
- "qunit": "^2.16.0",
- "request": "^2.88.2",
- "rsvp": "^4.8.5",
- "symlink-or-copy": "^1.1.8",
- "webpack": "^5.70.0"
+ "prettier": "2.6.2"
},
"engines": {
"node": ">= 12.*"
@@ -78,7 +37,6 @@
"edition": "octane"
},
"ember-addon": {
- "configPath": "tests/dummy/config",
"versionCompatibility": {
"ember": ">=3.4"
}
diff --git a/packages/ember-cookies/tests/dummy/.eslintrc.js b/packages/ember-cookies/tests/dummy/.eslintrc.js
deleted file mode 100644
index 4f9ce5ae..00000000
--- a/packages/ember-cookies/tests/dummy/.eslintrc.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-module.exports = {
- overrides: [
- {
- files: ['**/*.js'],
- rules: {
- 'ember/no-classic-classes': 'off',
- },
- },
- ],
-};
diff --git a/packages/ember-cookies/tests/dummy/config/ember-cli-update.json b/packages/ember-cookies/tests/dummy/config/ember-cli-update.json
deleted file mode 100644
index ed844ebc..00000000
--- a/packages/ember-cookies/tests/dummy/config/ember-cli-update.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "schemaVersion": "1.0.0",
- "packages": [
- {
- "name": "ember-cli",
- "version": "3.26.1",
- "blueprints": [
- {
- "name": "addon",
- "outputRepo": "https://github.com/ember-cli/ember-addon-output",
- "codemodsSource": "ember-addon-codemods-manifest@1",
- "isBaseBlueprint": true,
- "options": [
- "--welcome",
- "--yarn"
- ]
- }
- ]
- }
- ]
-}
diff --git a/packages/test-app/.babelrc.js b/packages/test-app/.babelrc.js
new file mode 100644
index 00000000..ec8a419f
--- /dev/null
+++ b/packages/test-app/.babelrc.js
@@ -0,0 +1,9 @@
+const { buildEmberPlugins } = require('ember-cli-babel');
+
+module.exports = function (api) {
+ api.cache(true);
+
+ return {
+ plugins: [...buildEmberPlugins(__dirname)],
+ };
+};
diff --git a/packages/ember-cookies/.editorconfig b/packages/test-app/.editorconfig
similarity index 100%
rename from packages/ember-cookies/.editorconfig
rename to packages/test-app/.editorconfig
diff --git a/packages/ember-cookies/.ember-cli b/packages/test-app/.ember-cli
similarity index 100%
rename from packages/ember-cookies/.ember-cli
rename to packages/test-app/.ember-cli
diff --git a/packages/test-app/.eslintignore b/packages/test-app/.eslintignore
new file mode 100644
index 00000000..cf068c75
--- /dev/null
+++ b/packages/test-app/.eslintignore
@@ -0,0 +1,22 @@
+/node-tests/fixtures/
+
+# unconventional js
+/blueprints/*/files/
+/vendor/
+
+# compiled output
+/dist/
+/tmp/
+
+# dependencies
+/bower_components/
+/node_modules/
+
+# misc
+/coverage/
+!.*
+
+# ember-try
+/.node_modules.ember-try/
+/bower.json.ember-try
+/package.json.ember-try
diff --git a/packages/test-app/.eslintrc.js b/packages/test-app/.eslintrc.js
new file mode 100644
index 00000000..0689097a
--- /dev/null
+++ b/packages/test-app/.eslintrc.js
@@ -0,0 +1,53 @@
+'use strict';
+
+module.exports = {
+ root: true,
+ parser: '@babel/eslint-parser',
+ parserOptions: {
+ ecmaVersion: 2020,
+ sourceType: 'module',
+ ecmaFeatures: {
+ legacyDecorators: true,
+ },
+ },
+ plugins: ['ember'],
+ extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:prettier/recommended'],
+ env: {
+ browser: true,
+ },
+ rules: {
+ 'ember/no-classic-classes': 'off',
+ },
+ overrides: [
+ // node files
+ {
+ files: [
+ '.babelrc.js',
+ '.eslintrc.js',
+ '**/.eslintrc.js',
+ '.prettierrc.js',
+ '.template-lintrc.js',
+ 'ember-cli-build.js',
+ 'testem.js',
+ 'blueprints/*/index.js',
+ 'config/**/*.js',
+ ],
+ excludedFiles: ['app/**'],
+ parserOptions: {
+ sourceType: 'script',
+ },
+ env: {
+ browser: false,
+ node: true,
+ },
+ plugins: ['node'],
+ extends: ['plugin:node/recommended'],
+ },
+ // test files
+ {
+ files: ['tests/**/*-test.js'],
+ plugins: ['qunit'],
+ extends: ['plugin:qunit/recommended'],
+ },
+ ],
+};
diff --git a/packages/test-app/.gitignore b/packages/test-app/.gitignore
new file mode 100644
index 00000000..03578211
--- /dev/null
+++ b/packages/test-app/.gitignore
@@ -0,0 +1,24 @@
+# See https://help.github.com/ignore-files/ for more about ignoring files.
+
+# compiled output
+/dist
+/tmp
+
+# dependencies
+/node_modules
+/bower_components
+
+# misc
+/.eslintcache
+/.sass-cache
+/connect.lock
+/coverage/*
+/libpeerconnection.log
+npm-debug.log*
+yarn-error.log
+testem.log
+.DS_Store
+
+# ember-try
+.node_modules.ember-try/
+package.json.ember-try
diff --git a/packages/test-app/.npmignore b/packages/test-app/.npmignore
new file mode 100644
index 00000000..a212d724
--- /dev/null
+++ b/packages/test-app/.npmignore
@@ -0,0 +1,18 @@
+/.node_modules.ember-try
+/bower_components
+/config/ember-try.js
+/dist
+/node-tests
+/tests
+/tmp
+**/.gitkeep
+.babelrc.js
+.bowerrc
+.editorconfig
+.ember-cli
+.gitignore
+.eslintrc.js
+.watchmanconfig
+bower.json
+ember-cli-build.js
+testem.js
diff --git a/packages/test-app/.prettierrc.js b/packages/test-app/.prettierrc.js
new file mode 100644
index 00000000..70d17558
--- /dev/null
+++ b/packages/test-app/.prettierrc.js
@@ -0,0 +1,9 @@
+'use strict';
+
+module.exports = {
+ printWidth: 100,
+ semi: true,
+ arrowParens: 'avoid',
+ singleQuote: true,
+ trailingComma: 'es5',
+};
diff --git a/packages/ember-cookies/.watchmanconfig b/packages/test-app/.watchmanconfig
similarity index 100%
rename from packages/ember-cookies/.watchmanconfig
rename to packages/test-app/.watchmanconfig
diff --git a/packages/ember-cookies/tests/dummy/app/app.js b/packages/test-app/app/app.js
similarity index 87%
rename from packages/ember-cookies/tests/dummy/app/app.js
rename to packages/test-app/app/app.js
index 523bad60..1ba93424 100644
--- a/packages/ember-cookies/tests/dummy/app/app.js
+++ b/packages/test-app/app/app.js
@@ -1,7 +1,7 @@
import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
-import config from 'dummy/config/environment';
+import config from 'test-app/config/environment';
export default class App extends Application {
modulePrefix = config.modulePrefix;
diff --git a/packages/ember-cookies/tests/dummy/app/components/.gitkeep b/packages/test-app/app/components/.gitkeep
similarity index 100%
rename from packages/ember-cookies/tests/dummy/app/components/.gitkeep
rename to packages/test-app/app/components/.gitkeep
diff --git a/packages/ember-cookies/tests/dummy/app/controllers/.gitkeep b/packages/test-app/app/controllers/.gitkeep
similarity index 100%
rename from packages/ember-cookies/tests/dummy/app/controllers/.gitkeep
rename to packages/test-app/app/controllers/.gitkeep
diff --git a/packages/ember-cookies/tests/dummy/app/controllers/index.js b/packages/test-app/app/controllers/index.js
similarity index 100%
rename from packages/ember-cookies/tests/dummy/app/controllers/index.js
rename to packages/test-app/app/controllers/index.js
diff --git a/packages/ember-cookies/tests/dummy/app/helpers/.gitkeep b/packages/test-app/app/helpers/.gitkeep
similarity index 100%
rename from packages/ember-cookies/tests/dummy/app/helpers/.gitkeep
rename to packages/test-app/app/helpers/.gitkeep
diff --git a/packages/ember-cookies/tests/dummy/app/index.html b/packages/test-app/app/index.html
similarity index 89%
rename from packages/ember-cookies/tests/dummy/app/index.html
rename to packages/test-app/app/index.html
index 61400b20..bd02ea27 100644
--- a/packages/ember-cookies/tests/dummy/app/index.html
+++ b/packages/test-app/app/index.html
@@ -10,7 +10,7 @@
{{content-for "head"}}
-
+
{{content-for "head-footer"}}
@@ -18,7 +18,7 @@
{{content-for "body"}}
-
+
{{content-for "body-footer"}}