Skip to content

Conversation

ETLaurent
Copy link
Contributor

@ETLaurent ETLaurent commented Aug 26, 2025

⚠️ Must merge these 2 PRs and release them first:

Summary

Following deprecation warnings fixed ✅ :

  • eslint (via eslint-config-apostrophe)
  • @humanwhocodes/object-schema
  • google-p12-pem (via uploadfs)

Couldn't fix these ❌ :

  • inflight: brought by glob via nyc at its most up to date version:

Note that upgrading mocha did reduce the usage of inflight because latest version is using glob 10.

─┬ nyc@17.1.0
  ├─┬ glob@7.2.3
  │ └── inflight@1.0.6
  ├─┬ rimraf@3.0.2
  │ └─┬ glob@7.2.3
  │   └── inflight@1.0.6 deduped
  └─┬ test-exclude@6.0.0
    └─┬ glob@7.2.3
      └── inflight@1.0.6 deduped
  • glob 7: still too widely used by other dependencies

  • rimraf 3: still used by nyc at its latest version

  • querystring: brought by aws-sdk at its most up to date version:

uploadfs@1.25.0
  └─┬ aws-sdk@2.1692.0
    ├── querystring@0.2.0
    └─┬ url@0.10.3
      └── querystring@0.2.0

before

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated google-p12-pem@4.0.1: Package is no longer maintained
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.

after

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Copy link

linear bot commented Aug 26, 2025

"form-data": "^4.0.4",
"mocha": "^10.7.3",
"nyc": "^15.1.0",
"replace-in-file": "^6.1.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wasn't used

@@ -132,15 +132,15 @@
"xregexp": "^2.0.0"
},
"devDependencies": {
"eslint-config-apostrophe": "^5.0.0",
"eslint": "^9.34.0",
"eslint-config-apostrophe": "github:apostrophecms/eslint-config-apostrophe#pro-8109-upgrade-dependencies",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: use version 6 when apostrophecms/eslint-config-apostrophe#22 is merged

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds accurate.

@@ -121,7 +121,7 @@
"tiny-emitter": "^2.1.0",
"tough-cookie": "^4.0.0",
"underscore.string": "^3.3.4",
"uploadfs": "^1.24.3",
"uploadfs": "github:apostrophecms/uploadfs#pro-8109-upgrade-dependencies",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: use version 6 when apostrophecms/uploadfs#103 is merged

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant to say we can go back to depending on npm after uploadfs is published. And that it will use gcs 7, not 6.

Flagging we have to do this before publishing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exactly, sorry,

TODO: use version 1.25.1*

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused file that included replace-in-file dependency, which was not used either in this file

@ETLaurent ETLaurent requested review from boutell, haroun and ValJed August 27, 2025 16:30
@ETLaurent ETLaurent marked this pull request as ready for review August 27, 2025 16:30
@ETLaurent ETLaurent added the don't merge yet This PR is meant to be merged, but not right away label Aug 27, 2025
eslint.config.js Outdated
Comment on lines 5 to 12
globalIgnores([
'**/vendor/**/*.js',
'**/blueimp/**/*.js',
'**/node_modules',
'test/public',
'test/apos-build',
'coverage'
]),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the way to ignore files now... https://eslint.org/docs/latest/use/configure/ignore

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but why having it at project level and not in the global config?
My take is that we shouldn't introduce project level configuration. We already spent time refactoring this and it might make future migration to monorepos easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only moved these from the deleted .gitignore file: https://github.com/apostrophecms/apostrophe/pull/5043/files#diff-a0fdacd2ade87c5238dde44378f574f7e123e669acdf8b740878b14b33b20275

I suggest we'll do this work in a separate PRs in order to scope that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and these are slightly different from the ones in tested

image

and starterkit

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@ValJed ValJed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not have removed rules like max-len.

eslint.config.js Outdated
Comment on lines 5 to 12
globalIgnores([
'**/vendor/**/*.js',
'**/blueimp/**/*.js',
'**/node_modules',
'test/public',
'test/apos-build',
'coverage'
]),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but why having it at project level and not in the global config?
My take is that we shouldn't introduce project level configuration. We already spent time refactoring this and it might make future migration to monorepos easier.

Copy link
Contributor

@ValJed ValJed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments above.

  • Missing rules
  • Specific config (everything should be in global).

@ETLaurent ETLaurent requested a review from ValJed September 8, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
don't merge yet This PR is meant to be merged, but not right away
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants