Skip to content

Commit

Permalink
Merge pull request #17132 from ckeditor/i/3772-esm
Browse files Browse the repository at this point in the history
Internal: Align the repository to changes in ckeditor5-dev (ESM).
  • Loading branch information
pomek authored Oct 2, 2024
2 parents 3cda881 + cb062d8 commit 915c3a7
Show file tree
Hide file tree
Showing 241 changed files with 1,929 additions and 1,787 deletions.
6 changes: 2 additions & 4 deletions .circleci/.stale-bot.js → .circleci/.stale-bot.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
/* eslint-env node */
/* eslint-disable max-len */

'use strict';

module.exports = {
export default {
GITHUB_TOKEN: process.env.CKE5_GITHUB_TOKEN,
REPOSITORY_SLUG: 'ckeditor/ckeditor5',
DAYS_BEFORE_STALE: 365,
Expand Down Expand Up @@ -46,4 +44,4 @@ module.exports = {
STALE_PR_MESSAGE: 'There has been no activity on this PR for the past year. We\'ve marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you\'re interested in the contribution, leave a comment or reaction under this PR.',
CLOSE_ISSUE_MESSAGE: 'We\'ve closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).',
CLOSE_PR_MESSAGE: 'We\'ve closed your PR due to inactivity. While time has passed, the core of your contribution might still be relevant. If you\'re able, consider reopening a similar PR.'
};
}
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
command: yarn install
- run:
name: Generate a new configuration to check all packages in the repository
command: node scripts/ci/generate-circleci-configuration.js
command: node scripts/ci/generate-circleci-configuration.mjs
- continuation/continue:
configuration_path: .circleci/config-tests.yml

Expand Down
10 changes: 5 additions & 5 deletions .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,15 @@ jobs:
- run:
when: always
name: Validate "ckeditor5-metadata.json" files
command: node scripts/ci/validate-metadata-files.js
command: node scripts/ci/validate-metadata-files.mjs
- run:
when: always
name: Check if all SVG files are optimized
command: yarn run clean-up-svg-icons --verify-only
- run:
when: always
name: Validate manual test directories
command: node scripts/ci/check-manual-tests-directory-structure.js
command: node scripts/ci/check-manual-tests-directory-structure.mjs
- run:
when: always
name: Execute ESLint
Expand Down Expand Up @@ -187,7 +187,7 @@ jobs:
# Do not fail if the Node script ends with non-zero exit code.
set +e
node scripts/ci/is-ckeditor5-ready-to-release.js
node scripts/ci/is-ckeditor5-ready-to-release.mjs
EXIT_CODE=$( echo $? )
if [ ${EXIT_CODE} -eq 1 ];
Expand Down Expand Up @@ -259,11 +259,11 @@ jobs:
- bootstrap_repository_command
- run:
name: Run stale bot
command: yarn ckeditor5-dev-stale-bot --config-path .circleci/.stale-bot.js
command: yarn ckeditor5-dev-stale-bot --config-path .circleci/.stale-bot.mjs

workflows:
version: 2
# `cke5_tests_framework` and `cke5_tests_features_batch_n` jobs are generated by the `scripts/ci/generate-config-tests.js` script.
# `cke5_tests_framework` and `cke5_tests_features_batch_n` jobs are generated by the `scripts/ci/generate-config-tests.mjs` script.
main:
when:
and:
Expand Down
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@

module.exports = {
extends: 'ckeditor5',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
ignorePatterns: [
// The CKEditor 5 core DLL build is created from JavaScript files.
// ESLint should not process compiled TypeScript.
'src/*.js'
'src/*.js',
'**/*.d.ts'
],
rules: {
'ckeditor5-rules/ckeditor-imports': 'error',
Expand Down
6 changes: 6 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
"plugins": [
"stylelint-plugin-ckeditor5-rules/lib/license-header"
],
"ignoreFiles": [
"**/dist/**",
"coverage/**",
"external/**",
"release/**"
],
"rules": {
"ckeditor5-rules/license-header": [
true,
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/architecture/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,5 @@ The data used to generate the following tables comes from the package metadata.
}
</style>

{@exec ../scripts/docs/features-html-output/build-features-html-output.js}
{@exec ../scripts/docs/features-html-output/build-features-html-output.cjs}

2 changes: 1 addition & 1 deletion docs/getting-started/advanced/content-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ The content in the frontend of your application should now look the same as when
Below there is a full list of content styles used by the editor features. You can copy it and use it straight in your project. **Make sure to add the `ck-content` class to your content container for the styles to work** ([see above](#sharing-content-styles-between-frontend-and-backend)).

```css
{@exec ../scripts/docs/read-content-styles-file.js}
{@exec ../scripts/docs/read-content-styles-file.cjs}
```
6 changes: 3 additions & 3 deletions docs/umberto.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"slug": "ckeditor5",
"hooks": {
"beforeHexo": [
"../scripts/docs/build-content-styles.js"
"../scripts/docs/build-content-styles.mjs"
]
},
"reportIssueWidget": {
Expand Down Expand Up @@ -369,8 +369,8 @@
"examples/framework/content-placeholder.html": "features/merge-fields.html"
},
"scripts": {
"snippet-adapter": "../scripts/docs/snippetadapter",
"import-path": "../scripts/docs/getrealimportpath"
"snippet-adapter": "../scripts/docs/snippetadapter.mjs",
"import-path": "../scripts/docs/getrealimportpath.mjs"
},
"docsearch": {
"apiKey": "fc463c26455365ad403d5ec51796cd73",
Expand Down
2 changes: 1 addition & 1 deletion docs/updating/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ You can find more information about each release in the blog posts linked at the

This guide provides the changelog information for the 3 latest releases of CKEditor&nbsp;5. For older releases, refer to the [release notes on GitHub](https://github.com/ckeditor/ckeditor5/releases).

{@exec ../scripts/docs/get-latest-changelogs.js}
{@exec ../scripts/docs/get-latest-changelogs.cjs}
99 changes: 51 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,18 @@
"@ckeditor/ckeditor5-build-multi-root": "43.2.0",
"@ckeditor/ckeditor5-case-change": "43.2.0",
"@ckeditor/ckeditor5-comments": "43.2.0",
"@ckeditor/ckeditor5-dev-build-tools": "^43.0.0",
"@ckeditor/ckeditor5-dev-bump-year": "^43.0.0",
"@ckeditor/ckeditor5-dev-ci": "^43.0.0",
"@ckeditor/ckeditor5-dev-dependency-checker": "^43.0.0",
"@ckeditor/ckeditor5-dev-docs": "^43.0.0",
"@ckeditor/ckeditor5-dev-release-tools": "^43.0.0",
"@ckeditor/ckeditor5-dev-stale-bot": "^43.0.0",
"@ckeditor/ckeditor5-dev-tests": "^43.0.0",
"@ckeditor/ckeditor5-dev-transifex": "^43.0.0",
"@ckeditor/ckeditor5-dev-translations": "^43.0.0",
"@ckeditor/ckeditor5-dev-utils": "^43.0.0",
"@ckeditor/ckeditor5-dev-web-crawler": "^43.0.0",
"@ckeditor/ckeditor5-dev-build-tools": "^44.0.0",
"@ckeditor/ckeditor5-dev-bump-year": "^44.0.0",
"@ckeditor/ckeditor5-dev-ci": "^44.0.0",
"@ckeditor/ckeditor5-dev-dependency-checker": "^44.0.0",
"@ckeditor/ckeditor5-dev-docs": "^44.0.0",
"@ckeditor/ckeditor5-dev-release-tools": "^44.0.0",
"@ckeditor/ckeditor5-dev-stale-bot": "^44.0.0",
"@ckeditor/ckeditor5-dev-tests": "^44.0.0",
"@ckeditor/ckeditor5-dev-transifex": "^44.0.0",
"@ckeditor/ckeditor5-dev-translations": "^44.0.0",
"@ckeditor/ckeditor5-dev-utils": "^44.0.0",
"@ckeditor/ckeditor5-dev-web-crawler": "^44.0.0",
"@ckeditor/ckeditor5-document-outline": "43.2.0",
"@ckeditor/ckeditor5-export-pdf": "43.2.0",
"@ckeditor/ckeditor5-export-word": "43.2.0",
Expand All @@ -125,22 +125,23 @@
"acorn": "^8.11.3",
"assert": "^2.0.0",
"babel-standalone": "^6.26.0",
"chalk": "^4.1.0",
"chalk": "^5.0.0",
"ckeditor5-premium-features": "43.2.0",
"coveralls": "^3.1.0",
"date-fns": "^2.30.0",
"eslint": "^7.19.0",
"date-fns": "^4.0.0",
"eslint": "^8.21.0",
"eslint-config-ckeditor5": "^7.0.0",
"eslint-formatter-stylish": "^8.40.0",
"estree-walker": "^3.0.3",
"fs-extra": "^11.1.1",
"glob": "^10.2.5",
"fs-extra": "^11.0.0",
"glob": "^10.0.0",
"http-server": "^14.1.1",
"husky": "^8.0.2",
"ini": "^4.1.1",
"is-relative-url": "^3.0.0",
"js-yaml": "^4.1.0",
"lint-staged": "^12.0.0",
"listr2": "^6.5.0",
"lint-staged": "^15.0.0",
"listr2": "^8.0.0",
"minimatch": "^5.1.0",
"minimist": "^1.2.8",
"mkdirp": "^1.0.4",
Expand All @@ -150,16 +151,16 @@
"publint": "^0.2.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^3.0.2",
"rimraf": "^5.0.0",
"schema-utils": "^4.2.0",
"sharp": "^0.32.6",
"stylelint": "^13.5.0",
"stylelint-config-ckeditor5": "^4.0.0",
"svgo": "^2.2.2",
"table": "^6.8.1",
"terser-webpack-plugin": "^4.2.3",
"terser-webpack-plugin": "^5.0.0",
"typescript": "5.0.4",
"umberto": "^4.2.6",
"umberto": "^4.4.0",
"upath": "^2.0.0",
"wait-on": "^6.0.1",
"webpack": "^5.94.0"
Expand All @@ -176,43 +177,44 @@
"url": "https://github.com/ckeditor/ckeditor5.git"
},
"scripts": {
"postinstall": "node ./scripts/postinstall.js",
"lint": "eslint --quiet \"**/*.{js,ts,mjs}\" --format ./scripts/eslint-formatter.js",
"postinstall": "node ./scripts/postinstall.mjs",
"lint": "eslint --quiet \"**/*.{js,ts,mjs,cjs}\" --format ./scripts/eslint-formatter.cjs",
"stylelint": "stylelint --quiet --allow-empty-input \"packages/**/*.css\" \"docs/**/*.css\"",
"test": "node --max_old_space_size=4096 node_modules/@ckeditor/ckeditor5-dev-tests/bin/testautomated.js",
"manual": "node --max_old_space_size=8192 node_modules/@ckeditor/ckeditor5-dev-tests/bin/testmanual.js",
"manual:verify": "node ./scripts/web-crawler/index.js --manual",
"manual:verify": "node ./scripts/web-crawler/index.mjs --manual",
"bootstrap": "yarn install",
"clean": "npx rimraf --glob package-lock.json yarn.lock ./**/node_modules",
"reset": "rm -rf ./node_modules && yarn run bootstrap",
"reinstall": "yarn run clean && yarn run bootstrap",
"docs": "node --max-old-space-size=8192 ./scripts/docs/build-docs.js",
"docs:api": "node ./scripts/docs/build-api-docs.js",
"docs:content-styles": "node -e \"require( './scripts/docs/build-content-styles.js' )();\"",
"docs": "node --max-old-space-size=8192 scripts/docs/build-docs.mjs",
"docs:api": "node scripts/docs/build-api-docs.mjs",
"docs:content-styles": "node -e \"import( './scripts/docs/build-content-styles.mjs' ).then( m => m.default() );\"",
"docs:serve": "http-server ./build/docs/",
"docs:verify": "node ./scripts/web-crawler/index.js --docs",
"docs:lint": "node scripts/vale/vale.js",
"docs:verify": "node ./scripts/web-crawler/index.mjs --docs",
"docs:lint": "node scripts/vale/vale.mjs",
"docs:vale": "vale",
"translations:collect": "node ./scripts/translations/collect.js",
"translations:download": "node ./scripts/translations/download.js",
"translations:upload": "node ./scripts/translations/upload.js",
"translations:collect": "node ./scripts/translations/collect.mjs",
"translations:download": "node ./scripts/translations/download.mjs",
"translations:upload": "node ./scripts/translations/upload.mjs",
"build": "tsc -p ./tsconfig.release-ckeditor5.json",
"build:dist": "node ./scripts/build-ckeditor5.mjs",
"build:dist": "node scripts/nim/build-ckeditor5.mjs",
"predll:build": "npm run build",
"dll:build": "node ./scripts/dll/build-dlls.js --base-dll-config ./scripts/dll/webpack.config.dll.js",
"changelog": "node ./scripts/release/changelog.js",
"release:prepare-packages": "node ./scripts/release/preparepackages.js",
"release:publish-packages": "node ./scripts/release/publishpackages.js",
"release:deploy-cdn": "node ./scripts/release/deploycdn.js",
"release:lint-packages": "node ./scripts/release/validatepackages.js",
"release:switch-latest": "node ./scripts/release/switchlatest.js",
"release:clean": "node ./scripts/release/clean.js",
"clean-up-svg-icons": "node ./scripts/clean-up-svg-icons.js",
"collect-svg-icons": "node scripts/collect-svg-icons.js",
"dll:build": "node scripts/dll/build-dlls.mjs --base-dll-config ./scripts/dll/webpack.config.dll.mjs",
"changelog": "node ./scripts/release/changelog.mjs",
"release:prepare-packages": "node ./scripts/release/preparepackages.mjs",
"release:publish-packages": "node ./scripts/release/publishpackages.mjs",
"release:deploy-cdn": "node ./scripts/release/deploycdn.mjs",
"release:lint-packages": "node ./scripts/release/validatepackages.mjs",
"release:switch-latest": "node ./scripts/release/switchlatest.mjs",
"release:clean": "node ./scripts/release/clean.mjs",
"clean-up-svg-icons": "node ./scripts/clean-up-svg-icons.mjs",
"collect-svg-icons": "node scripts/collect-svg-icons.mjs",
"check-dependencies": "ckeditor5-dev-dependency-checker",
"check-dependencies:versions-match": "node ./scripts/ci/check-dependencies-versions-match.js",
"check-theme-lark-imports": "node ./scripts/check-theme-lark-imports.js",
"check-exports": "node ./scripts/check-exports.mjs --input=ckeditor5"
"check-dependencies:versions-match": "node ./scripts/ci/check-dependencies-versions-match.mjs",
"check-theme-lark-imports": "node ./scripts/check-theme-lark-imports.mjs",
"check-exports": "node ./scripts/check-exports.mjs --input=ckeditor5",
"bump-year": "node ./scripts/bump-year.mjs"
},
"lint-staged": {
"**/*.{js,ts,mjs}": [
Expand All @@ -230,7 +232,8 @@
"packages/*/dist/**",
"packages/*/src/lib/**",
"coverage/**",
"external/**"
"external/**",
"release/**"
],
"workspaces": {
"packages": [
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-adapter-ckfinder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"devDependencies": {
"@ckeditor/ckeditor5-basic-styles": "43.2.0",
"@ckeditor/ckeditor5-clipboard": "43.2.0",
"@ckeditor/ckeditor5-dev-utils": "^43.0.0",
"@ckeditor/ckeditor5-dev-utils": "^44.0.0",
"@ckeditor/ckeditor5-editor-classic": "43.2.0",
"@ckeditor/ckeditor5-enter": "43.2.0",
"@ckeditor/ckeditor5-heading": "43.2.0",
Expand Down Expand Up @@ -56,6 +56,6 @@
"scripts": {
"dll:build": "webpack",
"build": "tsc -p ./tsconfig.json",
"build:dist": "node ../../scripts/build-package.mjs"
"build:dist": "node ../../scripts/nim/build-package.mjs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

'use strict';

/* eslint-env node */

const { builds } = require( '@ckeditor/ckeditor5-dev-utils' );
const webpack = require( 'webpack' );
import path from 'path';
import { fileURLToPath } from 'url';
import module from 'module';
import { builds } from '@ckeditor/ckeditor5-dev-utils';
import webpack from 'webpack';

const require = module.createRequire( import.meta.url );
const __filename = fileURLToPath( import.meta.url );
const __dirname = path.dirname( __filename );

module.exports = builds.getDllPluginWebpackConfig( webpack, {
export default builds.getDllPluginWebpackConfig( webpack, {
themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ),
packagePath: __dirname,
manifestPath: require.resolve( 'ckeditor5/build/ckeditor5-dll.manifest.json' ),
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-alignment/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@ckeditor/ckeditor5-block-quote": "43.2.0",
"@ckeditor/ckeditor5-dev-utils": "^43.0.0",
"@ckeditor/ckeditor5-dev-utils": "^44.0.0",
"@ckeditor/ckeditor5-editor-classic": "43.2.0",
"@ckeditor/ckeditor5-engine": "43.2.0",
"@ckeditor/ckeditor5-enter": "43.2.0",
Expand Down Expand Up @@ -56,6 +56,6 @@
"scripts": {
"dll:build": "webpack",
"build": "tsc -p ./tsconfig.json",
"build:dist": "node ../../scripts/build-package.mjs"
"build:dist": "node ../../scripts/nim/build-package.mjs"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/

'use strict';

/* eslint-env node */

const { builds } = require( '@ckeditor/ckeditor5-dev-utils' );
const webpack = require( 'webpack' );
import path from 'path';
import { fileURLToPath } from 'url';
import module from 'module';
import { builds } from '@ckeditor/ckeditor5-dev-utils';
import webpack from 'webpack';

const require = module.createRequire( import.meta.url );
const __filename = fileURLToPath( import.meta.url );
const __dirname = path.dirname( __filename );

module.exports = builds.getDllPluginWebpackConfig( webpack, {
export default builds.getDllPluginWebpackConfig( webpack, {
themePath: require.resolve( '@ckeditor/ckeditor5-theme-lark' ),
packagePath: __dirname,
manifestPath: require.resolve( 'ckeditor5/build/ckeditor5-dll.manifest.json' ),
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-autoformat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@ckeditor/ckeditor5-basic-styles": "43.2.0",
"@ckeditor/ckeditor5-block-quote": "43.2.0",
"@ckeditor/ckeditor5-code-block": "43.2.0",
"@ckeditor/ckeditor5-dev-utils": "^43.0.0",
"@ckeditor/ckeditor5-dev-utils": "^44.0.0",
"@ckeditor/ckeditor5-editor-classic": "43.2.0",
"@ckeditor/ckeditor5-enter": "43.2.0",
"@ckeditor/ckeditor5-heading": "43.2.0",
Expand Down Expand Up @@ -61,6 +61,6 @@
"scripts": {
"dll:build": "webpack",
"build": "tsc -p ./tsconfig.json",
"build:dist": "node ../../scripts/build-package.mjs"
"build:dist": "node ../../scripts/nim/build-package.mjs"
}
}
Loading

0 comments on commit 915c3a7

Please sign in to comment.