Skip to content
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
8 changes: 0 additions & 8 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
/**
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,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Expand Down
15 changes: 3 additions & 12 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# unconventional js
/blueprints/*/files/
/blueprints/**/*files/
/vendor/

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

# dependencies
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# 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

tests/dummy/app/snippets.js
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
rules: {
'ember/no-classic-classes': 'off',
'ember/no-new-mixins': 'off',
'ember/no-runloop': 'off',
'ember/use-ember-data-rfc-395-imports': 'off',
},
overrides: [
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 7
version: 10
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -41,12 +41,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 7
version: 10
- uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --no-lockfile
Expand All @@ -63,10 +63,12 @@ jobs:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.28
- ember-4.0
- ember-lts-4.4
- ember-lts-4.8
- ember-lts-4.12
- ember-lts-5.4
- ember-lts-5.8
- ember-lts-5.12
- ember-release
- ember-beta
- ember-canary
Expand All @@ -75,13 +77,13 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 7
version: 10
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 14.x
node-version: 18
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand Down
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

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

# dependencies
/bower_components/
/node_modules/

# misc
/.sass-cache
/.env*
/.pnp*
/.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

# broccoli-debug
/DEBUG/

tests/dummy/app/snippets.js
8 changes: 2 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
/dist/
/tmp/

# dependencies
/bower_components/

# misc
/.bowerrc
/.editorconfig
/.ember-cli
/.env*
Expand All @@ -23,18 +19,18 @@
/.template-lintrc.js
/.travis.yml
/.watchmanconfig
/bower.json
/CONTRIBUTING.md
/ember-cli-build.js
/testem.js
/tests/
/tsconfig.declarations.json
/tsconfig.json
/yarn-error.log
/yarn.lock
.gitkeep

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
26 changes: 26 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
####################
# super strict mode
####################
auto-install-peers=false
strict-peer-dependents=true
resolve-peers-from-workspace-root=false

################
# Optimizations
################
# Less strict, but required for tooling to not barf on duplicate peer trees.
# (many libraries declare the same peers, which resolve to the same
# versions)
peers-suffix-max-length=40
dedupe-injected-deps=true
dedupe-peer-dependents=true
public-hoist-pattern[]=ember-source
sync-injected-deps-after-scripts[]=build
sync-injected-deps-after-scripts[]=sync
inject-workspace-packages=true

################
# Compatibility
################
# highest is what everyone is used to, but
# not ensuring folks are actually compatible with declared ranges.
resolution-mode=highest
16 changes: 3 additions & 13 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,15 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.eslintcache
.lint-todo/
.*/

# 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

tests/dummy/app/snippets.js
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm 10.7.1
2 changes: 1 addition & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ignore_dirs": ["tmp", "dist"]
"ignore_dirs": ["dist"]
}
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

## Installation

* `git clone <repository-url>`
* `cd ember-cp-validations`
* `pnpm install`
- `git clone <repository-url>`
- `cd ember-cp-validations`
- `pnpm install`

## Linting

* `pnpm lint`
* `pnpm lint:fix`
- `pnpm lint`
- `pnpm lint:fix`

## Running tests

* `ember test` – Runs the test suite on the current Ember version
* `ember test --server` – Runs the test suite in "watch mode"
* `ember try:each` – Runs the test suite against multiple Ember versions
- `pnpm test` – Runs the test suite on the current Ember version
- `pnpm test:ember --server` – Runs the test suite in "watch mode"
- `pnpm test:ember-compatibility` – Runs the test suite against multiple Ember versions

## Running the dummy application

* `ember serve`
* Visit the dummy application at [http://localhost:4200](http://localhost:4200).
- `pnpm start`
- Visit the dummy application at [http://localhost:4200](http://localhost:4200).

For more information on using ember-cli, visit [https://cli.emberjs.com/release/](https://cli.emberjs.com/release/).
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ An EmberJS validation framework that is completely and utterly computed property

| Addon | Ember | Node |
|-------|---------|---------|
| 7.x | >= 4.4 | >= 18.x |
| 6.x | >= 3.28 | >= 14.x |
| 5.x | >= 3.28 | >= 12.x |
| 4.x | <= 3.28 | >= 12.x |
Expand Down
4 changes: 2 additions & 2 deletions addon/-private/internal-result-object.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default EmberObject.extend({
}

return null;
}
},
),

errors: computed('error', function () {
Expand All @@ -82,7 +82,7 @@ export default EmberObject.extend({
}

return null;
}
},
),

warnings: computed('warning', function () {
Expand Down
4 changes: 2 additions & 2 deletions addon/-private/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const Result = EmberObject.extend({
this._resultOverride ||
InternalResultObject.create({ model, attribute, _promise, _validator })
);
}
},
),

init() {
Expand Down Expand Up @@ -255,7 +255,7 @@ const Result = EmberObject.extend({
this._promise
.then(
(value) => this.update(value),
(value) => this.update(value)
(value) => this.update(value),
)
.catch((reason) => {
// TODO: send into error state
Expand Down
2 changes: 1 addition & 1 deletion addon/utils/deep-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function deepSet(
path,
value,
useEmberObject = false,
delimiter = '.'
delimiter = '.',
) {
let keyPath = path.split(delimiter);
let lastKeyIndex = keyPath.length - 1;
Expand Down
4 changes: 2 additions & 2 deletions addon/utils/lookup-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
export default function lookupValidator(owner, type) {
if (!owner) {
throw new Error(
`[ember-cp-validations] \`lookupValidator\` requires owner/container access.`
`[ember-cp-validations] \`lookupValidator\` requires owner/container access.`,
);
}

const validatorClass = owner.factoryFor(`validator:${type}`);

if (!validatorClass) {
throw new Error(
`[ember-cp-validations] Validator not found of type: ${type}.`
`[ember-cp-validations] Validator not found of type: ${type}.`,
);
}

Expand Down
Loading