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
14 changes: 14 additions & 0 deletions .changeset/quiet-pugs-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
---

No release needed for core, react or vue. Everything this branch changed in
them is tooling that never ships: `packages/core` swapped devDependencies and
`vitest.config.js` moving from vitest 0.34 to 1.6, and core and vue each lost a
stale `eslint-disable` comment during the eslint 9 migration. `files` publishes
`dist` alone, and the built `dist` for all three is byte-identical to develop —
checked by building both revisions and diffing.

Recorded so the changeset check has an answer for them, rather than being
satisfied by version bumps that would publish identical tarballs. Only
`@dynamic-field-kit/angular` genuinely changed what it ships, and it has its own
changeset.
25 changes: 25 additions & 0 deletions .changeset/tidy-moons-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
'@dynamic-field-kit/angular': patch
---

Build with ng-packagr 19 instead of 17, which is what the package's Angular
version has needed all along — ng-packagr 17 declared peers of
`@angular/compiler-cli ^17` and `typescript >=5.2 <5.5` against an installed
19.2.25 and 5.6.3, so installing needed `--legacy-peer-deps`.

The bundle consumers actually load is unchanged: `fesm2022` is byte-identical,
as are `index.d.ts` and `public-api.d.ts`. What changes is the rest of the
tarball. ng-packagr stopped emitting the per-file `esm2022/` output in 18,
because the fesm2022 bundle is what the Angular linker consumes, and its
`esm2022` and `esm` export conditions go with it. The `.` export keeps `types`
and `default`, matching what every Angular 19+ library ships.

| | Before | After |
| -------- | -------- | --------------- |
| Unpacked | 317.1 KB | 165.9 KB (−48%) |
| Tarball | 75.8 KB | 33.7 KB (−56%) |
| Files | 33 | 19 |

If you were resolving this package through the `esm` or `esm2022` condition
explicitly, resolution now falls through to `default`, which points at the same
fesm2022 file those conditions already resolved to.
15 changes: 0 additions & 15 deletions .eslintignore

This file was deleted.

67 changes: 0 additions & 67 deletions .eslintrc.cjs

This file was deleted.

94 changes: 94 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import js from '@eslint/js';
import prettierConfig from 'eslint-config-prettier';
import importPlugin from 'eslint-plugin-import';
import globals from 'globals';
import tseslint from 'typescript-eslint';

// Flat config, replacing .eslintrc.cjs + .eslintignore. eslint 9 reads neither.
export default tseslint.config(
// Global ignores. These were .eslintignore, which eslint 9 no longer reads,
// plus the old ignorePatterns. The example apps and smoke workspace stay out:
// the `lint` script never covered them, but the pre-commit hook matches *.js
// anywhere, and linting them against a config written for library source
// fails on things like a `require` in next.config.js or an import it cannot
// resolve from an example's own node_modules. They are still
// prettier-checked, typechecked by their own builds, and built in CI.
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'**/coverage/**',
'**/.nyc_output/**',
'**/*.d.ts',
'**/*.log',
'example/**',
'smoke/**',
],
},

js.configs.recommended,
...tseslint.configs.recommended,
importPlugin.flatConfigs.recommended,
importPlugin.flatConfigs.typescript,

// eslint-config-prettier only turns off rules that fight the formatter.
// Formatting itself is not linted: `npm run format-check` is its own CI gate
// and lint-staged runs `prettier --write` before eslint, so running prettier
// through eslint as well would be a slower second copy of a check that
// already exists.
prettierConfig,

{
files: ['**/*.{js,cjs,mjs,ts,tsx}'],
languageOptions: {
globals: { ...globals.node, ...globals.es2021 },
ecmaVersion: 2021,
sourceType: 'module',
},
settings: {
'import/resolver': {
node: { extensions: ['.ts', '.tsx', '.js', '.jsx'] },
},
'import/ignore': ['node_modules', '\\.d\\.ts$'],
},
rules: {
curly: 'error',
eqeqeq: 'error',
semi: ['error', 'always'],
'no-console': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-explicit-any': 'off',
'max-len': ['error', { code: 120 }],
'prefer-const': 'error',
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'import/no-unresolved': [
'error',
{ ignore: ['^@angular', '^vue', '^@dynamic-field-kit'] },
],
},
},

// CommonJS build scripts and config files.
{
files: ['scripts/**/*.js', '**/*.cjs'],
languageOptions: { sourceType: 'commonjs' },
rules: { '@typescript-eslint/no-require-imports': 'off' },
}
);
Loading