diff --git a/.github/workflows/alpha-releases.yml b/.github/workflows/alpha-releases.yml index 163c89133d3..11e9b8411a5 100644 --- a/.github/workflows/alpha-releases.yml +++ b/.github/workflows/alpha-releases.yml @@ -2,12 +2,12 @@ name: Alpha Releases on: schedule: - - cron: '0 20 * * 3' # weekly (Wednesday) + - cron: "0 20 * * 3" # weekly (Wednesday) workflow_dispatch: permissions: contents: read # PAT used for push - + jobs: tests: uses: ./.github/workflows/ci-jobs.yml @@ -15,7 +15,7 @@ jobs: release: name: Tag + Push runs-on: ubuntu-latest - needs: [ tests ] + needs: [tests] steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -28,7 +28,7 @@ jobs: - name: Find next alpha run: | LATEST_ALPHA=`npm view ember-source dist-tags.alpha` - export NEXT_ALPHA=`node bin/next-alpha-version.js ${LATEST_ALPHA}` + export NEXT_ALPHA=`node bin/next-alpha-version.cjs ${LATEST_ALPHA}` echo "NEXT_ALPHA=$NEXT_ALPHA" >> $GITHUB_ENV - name: bump version run: npm version ${NEXT_ALPHA} --allow-same-version --no-git-tag-version diff --git a/.github/workflows/ci-jobs.yml b/.github/workflows/ci-jobs.yml index 73f644736d9..86e734f8ac8 100644 --- a/.github/workflows/ci-jobs.yml +++ b/.github/workflows/ci-jobs.yml @@ -254,7 +254,7 @@ jobs: firefox-version: 115.9.1esr - run: firefox --version - name: test - run: pnpm ember test --path dist -c testem.ci-browsers.js + run: pnpm ember test --path dist -c testem.ci-browsers.cjs perf-check: name: Perf script still works diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59af20293f2..f104ecf69b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: # nightly ci cron branches - cron* paths-ignore: - - 'CHANGELOG.md' + - "CHANGELOG.md" pull_request: permissions: @@ -24,52 +24,52 @@ jobs: publish: name: Publish channel to s3 runs-on: ubuntu-latest - needs: [ tests ] + needs: [tests] # Only run on pushes to branches that are not from the cron workflow if: github.event_name == 'push' && contains(github.ref, 'cron') != true steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.js + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.cjs - uses: ./.github/actions/setup - name: build for publish - run: node bin/build-for-publishing.js + run: node bin/build-for-publishing.cjs - name: publish to s3 run: node bin/publish-to-s3.mjs env: - S3_BUCKET_NAME: 'builds.emberjs.com' + S3_BUCKET_NAME: "builds.emberjs.com" S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY}} S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID}} publish-alpha: name: Publish alpha from default branch runs-on: ubuntu-latest - needs: [ tests ] + needs: [tests] # Only run on pushes to main if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.js + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.cjs - uses: ./.github/actions/setup - name: build for publish - run: node bin/build-for-publishing.js + run: node bin/build-for-publishing.cjs - name: publish to s3 run: node bin/publish-to-s3.mjs env: BUILD_TYPE: alpha - OVERRIDE_FEATURES: '' - S3_BUCKET_NAME: 'builds.emberjs.com' + OVERRIDE_FEATURES: "" + S3_BUCKET_NAME: "builds.emberjs.com" S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY}} S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID}} notify: name: Notify Discord runs-on: ubuntu-latest - needs: [ tests ] + needs: [tests] if: failure() && contains(github.ref, 'cron') == true steps: - uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 with: webhook: ${{ secrets.FRAMEWORK_WEBHOOK }} - status: 'Failure' - title: 'Ember.js Nightly CI' + status: "Failure" + title: "Ember.js Nightly CI" color: 0xcc0000 - url: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" username: GitHub Actions diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml index 8ad17dec492..8396d1d7905 100644 --- a/.github/workflows/publish-to-npm.yml +++ b/.github/workflows/publish-to-npm.yml @@ -3,24 +3,24 @@ name: Publish to npm on: push: tags: - - 'v*' + - "v*" permissions: contents: read - + jobs: tests: uses: ./.github/workflows/ci-jobs.yml release: name: Release runs-on: ubuntu-latest - needs: [ tests ] + needs: [tests] permissions: contents: read id-token: write environment: deploy steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.js + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 # zizmor: ignore[artipacked] creds are used for build-for-publishing.cjs - uses: ./.github/actions/setup with: node-version: 20 @@ -31,11 +31,11 @@ jobs: if: ${{ contains(github.ref, 'alpha') }} env: BUILD_TYPE: alpha - OVERRIDE_FEATURES: '' - run: node bin/build-for-publishing.js + OVERRIDE_FEATURES: "" + run: node bin/build-for-publishing.cjs - name: Build for Publish if: ${{ !contains(github.ref, 'alpha') }} - run: node bin/build-for-publishing.js + run: node bin/build-for-publishing.cjs - name: publish to npm run: npm publish notify-failure: @@ -47,10 +47,10 @@ jobs: - uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 with: webhook: ${{ secrets.FRAMEWORK_WEBHOOK }} - status: 'Failure' - title: 'Failed to release ember-source ${{ github.ref_name }}' + status: "Failure" + title: "Failed to release ember-source ${{ github.ref_name }}" color: 0xcc0000 - url: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" username: GitHub Actions notify-success: name: Notify Discord of Release Success @@ -61,8 +61,8 @@ jobs: - uses: sarisia/actions-status-discord@eb045afee445dc055c18d3d90bd0f244fd062708 # v1.16.0 with: webhook: ${{ secrets.FRAMEWORK_WEBHOOK }} - status: 'Success' - title: 'Released ember-source ${{ github.ref_name }}' + status: "Success" + title: "Released ember-source ${{ github.ref_name }}" color: 0x2ecc71 - url: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" username: GitHub Actions diff --git a/RELEASE.md b/RELEASE.md index cca92b5dff4..34806cf1497 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -36,7 +36,7 @@ Rarely, a change is needed on an older version but not needed on main or newer v 1. `git push` to let CI run. You must push changes before running the CHANGELOG generation as it uses the GitHub API to find PRs. 1. Generate Changelog: ```bash - HEAD=release PRIOR_VERSION=v5.10.1-ember-source ./bin/changelog.js | uniq | pbcopy + HEAD=release PRIOR_VERSION=v5.10.1-ember-source ./bin/changelog.cjs | uniq | pbcopy ``` 1. Put the results in `CHANGELOG.md` under a heading for the new point release. Clean up the changelog, see [Producing the CHANGELOG](#producing-the-changelog) for the details. 1. Commit with message: @@ -80,7 +80,7 @@ After release, if it is the latest LTS, tag as LTS with `npm dist-tag add ember- 1. `git push` to let CI run. You must push changes before running the CHANGELOG generation as it uses the GitHub API to find PRs. 1. Generate Changelog ```bash - HEAD=beta PRIOR_VERSION=v5.12.0-beta.1-ember-source ./bin/changelog.js | uniq | pbcopy + HEAD=beta PRIOR_VERSION=v5.12.0-beta.1-ember-source ./bin/changelog.cjs | uniq | pbcopy ``` 1. Put the results in `CHANGELOG.md` under a heading for the new beta release. Clean up the changelog, see [Producing the CHANGELOG](#producing-the-changelog) for the details. 1. Commit with message: @@ -118,7 +118,7 @@ After release, if it is the latest LTS, tag as LTS with `npm dist-tag add ember- 1. `git push` to let CI run. You must push changes before running the CHANGELOG generation as it uses the GitHub API to find PRs. 1. Generate Changelog. The `PRIOR_VERSION` should be the last beta release of the series. ```bash - HEAD=beta PRIOR_VERSION=v5.12.0-beta.6-ember-source ./bin/changelog.js | uniq | pbcopy + HEAD=beta PRIOR_VERSION=v5.12.0-beta.6-ember-source ./bin/changelog.cjs | uniq | pbcopy ``` 1. Put the results in `CHANGELOG.md` under a heading for the new stable release. Combine the previous `beta` headings into one entry. Clean up the changelog, see [Producing the CHANGELOG](#producing-the-changelog) for the details. 1. Commit with message @@ -167,7 +167,7 @@ After release, if it is the latest LTS, tag as LTS with `npm dist-tag add ember- 1. Find the `sha` of the last commit common to `main` and the old `beta` branch. This is typically the cherry-pick of the CHANGELOG entry. 1. Generate Changelog. The `PRIOR_VERSION` is that `sha`: ```bash - HEAD=main PRIOR_VERSION=3daedddaafd638a4a6b12e0265df30255d1512e5 ./bin/changelog.js | uniq | pbcopy + HEAD=main PRIOR_VERSION=3daedddaafd638a4a6b12e0265df30255d1512e5 ./bin/changelog.cjs | uniq | pbcopy ``` 1. Put the results in `CHANGELOG.md` under a heading for the new beta release. Clean up the changelog, see [Producing the CHANGELOG](#producing-the-changelog) for the details. 1. Commit with message: diff --git a/babel.test.config.mjs b/babel.test.config.mjs index ae7d719422d..f83bb403a1f 100644 --- a/babel.test.config.mjs +++ b/babel.test.config.mjs @@ -12,7 +12,7 @@ import baseConfig from './babel.config.mjs'; // eslint-disable-next-line no-redeclare const require = createRequire(import.meta.url); -const buildDebugMacroPlugin = require('./broccoli/build-debug-macro-plugin.js'); +const buildDebugMacroPlugin = require('./broccoli/build-debug-macro-plugin.cjs'); const isProduction = process.env.EMBER_ENV === 'production'; export default { @@ -22,7 +22,7 @@ export default { [ '@babel/preset-env', { - targets: require('./config/targets.js'), + targets: require('./config/targets.cjs'), }, ], ], diff --git a/bin/benchmark.mjs b/bin/benchmark.mjs index 7affa4ac0ac..cdb672a01aa 100644 --- a/bin/benchmark.mjs +++ b/bin/benchmark.mjs @@ -19,7 +19,7 @@ Options: --no-headless run Chrome without headless mode (opens visible browser windows) Notes: - - This script runs \`pnpm install\` and \`node ./bin/build-for-publishing.js\` in both repos. + - This script runs \`pnpm install\` and \`node ./bin/build-for-publishing.cjs\` in both repos. - build-for-publishing updates files in-place; it will modify your working tree. - Benchmark apps are built with \`vite build\` and served using \`vite preview\`. `); diff --git a/bin/benchmark/utils.mjs b/bin/benchmark/utils.mjs index 7a39618738f..91ed8ea95a4 100644 --- a/bin/benchmark/utils.mjs +++ b/bin/benchmark/utils.mjs @@ -58,7 +58,12 @@ export async function waitForServer(url, { timeout = 30_000, interval = 500 } = export async function buildEmberSource(cwd) { await run('pnpm', ['install'], { cwd }); - await run('node', ['./bin/build-for-publishing.js'], { cwd }); + + if (existsSync(join(cwd, './bin/build-for-publishing.js'))) { + await run('node', ['./bin/build-for-publishing.js'], { cwd }); + return; + } + await run('node', ['./bin/build-for-publishing.cjs'], { cwd }); } /** diff --git a/bin/build-for-publishing.js b/bin/build-for-publishing.cjs similarity index 97% rename from bin/build-for-publishing.js rename to bin/build-for-publishing.cjs index 46c77df669a..9896b032a16 100755 --- a/bin/build-for-publishing.js +++ b/bin/build-for-publishing.cjs @@ -2,7 +2,7 @@ const fs = require('fs'); const path = require('path'); -const buildInfo = require('../broccoli/build-info').buildInfo(); +const buildInfo = require('../broccoli/build-info.cjs').buildInfo(); async function exec(command, args) { const { execa } = await import('execa'); diff --git a/bin/changelog.js b/bin/changelog.cjs similarity index 100% rename from bin/changelog.js rename to bin/changelog.cjs diff --git a/bin/feature-flag-yuidoc-filter.js b/bin/feature-flag-yuidoc-filter.cjs similarity index 96% rename from bin/feature-flag-yuidoc-filter.js rename to bin/feature-flag-yuidoc-filter.cjs index 6b3e1f3dc2c..75d9732d87d 100755 --- a/bin/feature-flag-yuidoc-filter.js +++ b/bin/feature-flag-yuidoc-filter.cjs @@ -1,4 +1,4 @@ -const FEATURES = require('../broccoli/features'); +const FEATURES = require('../broccoli/features.cjs'); function isClassToBeIncluded(item, featuresToFilter) { if (item.category) { diff --git a/bin/next-alpha-version.js b/bin/next-alpha-version.cjs similarity index 100% rename from bin/next-alpha-version.js rename to bin/next-alpha-version.cjs diff --git a/bin/publish-to-s3.mjs b/bin/publish-to-s3.mjs index 20e3aaf2e88..37537be047a 100755 --- a/bin/publish-to-s3.mjs +++ b/bin/publish-to-s3.mjs @@ -1,8 +1,8 @@ import { join } from 'node:path'; import { existsSync, realpathSync, readFileSync } from 'node:fs'; import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3'; -import { buildInfo as buildBuildInfo } from '../broccoli/build-info.js'; -import projectFileMap from '../config/s3ProjectConfig.js'; +import { buildInfo as buildBuildInfo } from '../broccoli/build-info.cjs'; +import projectFileMap from '../config/s3ProjectConfig.cjs'; const buildInfo = buildBuildInfo(); diff --git a/bin/run-browserstack-tests.js b/bin/run-browserstack-tests.cjs similarity index 97% rename from bin/run-browserstack-tests.js rename to bin/run-browserstack-tests.cjs index b44bf05612f..ced42e3d1a9 100755 --- a/bin/run-browserstack-tests.js +++ b/bin/run-browserstack-tests.cjs @@ -20,7 +20,7 @@ async function run(command, args = []) { const testemArgs = [ 'ci', '-f', - 'testem.browserstack.js', + 'testem.browserstack.cjs', '--host', '127.0.0.1', '--port', diff --git a/broccoli/build-debug-macro-plugin.js b/broccoli/build-debug-macro-plugin.cjs similarity index 100% rename from broccoli/build-debug-macro-plugin.js rename to broccoli/build-debug-macro-plugin.cjs diff --git a/broccoli/build-info.js b/broccoli/build-info.cjs similarity index 100% rename from broccoli/build-info.js rename to broccoli/build-info.cjs diff --git a/broccoli/canary-features.js b/broccoli/canary-features.cjs similarity index 94% rename from broccoli/canary-features.js rename to broccoli/canary-features.cjs index 97ec9cdb611..b571597d2f1 100644 --- a/broccoli/canary-features.js +++ b/broccoli/canary-features.cjs @@ -1,6 +1,6 @@ 'use strict'; -const FEATURES = require('./features'); +const FEATURES = require('./features.cjs'); module.exports = function canaryFeatures() { return [ diff --git a/broccoli/features.js b/broccoli/features.cjs similarity index 100% rename from broccoli/features.js rename to broccoli/features.cjs diff --git a/config/browserlists.js b/config/browserlists.cjs similarity index 74% rename from config/browserlists.js rename to config/browserlists.cjs index 60fc7020059..c2401deba65 100644 --- a/config/browserlists.js +++ b/config/browserlists.cjs @@ -1,4 +1,4 @@ -const allSupportedBrowsers = require('../lib/browsers'); +const allSupportedBrowsers = require('../lib/browsers.cjs'); const modernBrowsers = [ 'last 1 Chrome versions', diff --git a/config/s3ProjectConfig.js b/config/s3ProjectConfig.cjs similarity index 100% rename from config/s3ProjectConfig.js rename to config/s3ProjectConfig.cjs diff --git a/config/targets.js b/config/targets.cjs similarity index 95% rename from config/targets.js rename to config/targets.cjs index d573390cda9..cc2181f0645 100644 --- a/config/targets.js +++ b/config/targets.cjs @@ -1,5 +1,5 @@ 'use strict'; -const { allSupportedBrowsers, modernBrowsers } = require('./browserlists'); +const { allSupportedBrowsers, modernBrowsers } = require('./browserlists.cjs'); const isProduction = process.env.EMBER_ENV === 'production'; const browsers = diff --git a/eslint-rules/index.cjs b/eslint-rules/index.cjs new file mode 100644 index 00000000000..9962ffd8687 --- /dev/null +++ b/eslint-rules/index.cjs @@ -0,0 +1,7 @@ +'use strict'; + +module.exports = { + rules: { + 'no-barrel-imports': require('./no-barrel-imports.cjs'), + }, +}; diff --git a/eslint-rules/index.js b/eslint-rules/index.js deleted file mode 100644 index 436f5be5af9..00000000000 --- a/eslint-rules/index.js +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable no-undef */ - -'use strict'; - -module.exports = { - rules: { - 'no-barrel-imports': require('./no-barrel-imports'), - }, -}; diff --git a/eslint-rules/no-barrel-imports.js b/eslint-rules/no-barrel-imports.cjs similarity index 99% rename from eslint-rules/no-barrel-imports.js rename to eslint-rules/no-barrel-imports.cjs index e17fb184ed2..97f18ca165e 100644 --- a/eslint-rules/no-barrel-imports.js +++ b/eslint-rules/no-barrel-imports.cjs @@ -1,4 +1,3 @@ -/* eslint-disable no-undef */ 'use strict'; const fs = require('node:fs'); diff --git a/eslint.config.mjs b/eslint.config.mjs index c0cf94344ac..38ced976218 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,5 +1,5 @@ import emberInternal from 'eslint-plugin-ember-internal'; -import emberLocal from './eslint-rules/index.js'; +import emberLocal from './eslint-rules/index.cjs'; import importPlugin from 'eslint-plugin-import'; import qunitPluginRecommended from 'eslint-plugin-qunit/configs/recommended'; import disableFeatures from 'eslint-plugin-disable-features'; @@ -76,7 +76,6 @@ export default [ 'qunit/no-commented-tests': 'off', 'qunit/require-expect': 'off', - 'disable-features/disable-async-await': 'error', 'disable-features/disable-generator-functions': 'error', // Doesn't work with package.json#exports 'import/no-unresolved': 'off', @@ -234,26 +233,18 @@ export default [ '**/babel.config.mjs', '**/babel.test.config.mjs', 'node-tests/**/*.js', - 'tests/node/**/*.js', 'tests/node-vitest/**/*.js', 'smoke-tests/node-template/**/*.js', 'blueprints/**/*.js', - 'bin/**/*.js', 'bin/**/*.mjs', - 'tests/docs/*.js', - 'config/**/*.js', - 'lib/**/*.js', 'server/**/*.js', - '**/testem.js', - '**/testem.ci-browsers.js', - '**/testem.browserstack.js', - 'broccoli/**/*.js', - '**/ember-cli-build.js', + 'broccoli/**/*.*', + '**/ember-cli-build.*', '**/*.cjs', ], }, { - files: ['bin/changelog.js'], + files: ['bin/changelog.*'], rules: { 'n/hashbang': 'off', }, @@ -264,21 +255,10 @@ export default [ '**/babel.config.mjs', '**/babel.test.config.mjs', 'node-tests/**/*.js', - 'tests/node/**/*.js', 'tests/node-vitest/**/*.js', 'smoke-tests/node-template/**/*.js', 'blueprints/**/*.js', - 'bin/**/*.js', - 'bin/**/*.mjs', - 'tests/docs/*.js', - 'config/**/*.js', - 'lib/**/*.js', - 'server/**/*.js', - '**/testem.js', - '**/testem.ci-browsers.js', - '**/testem.browserstack.js', - 'broccoli/**/*.js', - '**/ember-cli-build.js', + '**/ember-cli-build.*', '**/*.cjs', ], @@ -307,7 +287,7 @@ export default [ }, }, { - files: ['tests/docs/**/*.js', 'tests/node/**/*.js'], + files: ['tests/docs/**/*.cjs', 'tests/node/**/*.cjs'], languageOptions: { globals: { diff --git a/lib/browsers.js b/lib/browsers.cjs similarity index 100% rename from lib/browsers.js rename to lib/browsers.cjs diff --git a/lib/index.js b/lib/index.cjs similarity index 99% rename from lib/index.js rename to lib/index.cjs index 6d14188dbc1..1aab0ad0389 100644 --- a/lib/index.js +++ b/lib/index.cjs @@ -1,8 +1,8 @@ 'use strict'; const path = require('path'); -const Overrides = require('./overrides'); -const SupportedBrowsers = require('./browsers'); +const Overrides = require('./overrides.cjs'); +const SupportedBrowsers = require('./browsers.cjs'); const isProduction = process.env.EMBER_ENV === 'production'; diff --git a/lib/overrides.js b/lib/overrides.cjs similarity index 100% rename from lib/overrides.js rename to lib/overrides.cjs diff --git a/package.json b/package.json index 64891b338bb..4ae63ac5f4a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/emberjs/ember.js/issues" }, "license": "MIT", - "main": "lib/index.js", + "main": "lib/index.cjs", "files": [ "build-metadata.json", "blueprints", @@ -44,17 +44,17 @@ "docs": "ember ember-cli-yuidoc", "start": "vite dev", "lint": "npm-run-all --continue-on-error --aggregate-output --parallel \"lint:!(fix)\"", - "lint:docs": "qunit tests/docs/coverage-test.js", + "lint:docs": "qunit tests/docs/coverage-test.cjs", "lint:eslint": "eslint --report-unused-disable-directives --cache .", "lint:eslint:fix": "npm-run-all \"lint:eslint --fix\"", "lint:fix": "npm-run-all lint:*:fix", "lint:format": "prettier --check .", "lint:format:fix": "prettier --write .", - "test": "testem ci -f testem.js --host 127.0.0.1 --port 13141", + "test": "testem ci -f testem.cjs --host 127.0.0.1 --port 13141", "test:blueprints": "mocha node-tests/blueprints/**/*-test.js", - "test:node": "qunit tests/node/**/*-test.js", + "test:node": "qunit tests/node/**/*-test.cjs", "test:node:vitest": "pnpm --filter ember-test-node-vitest test:node", - "test:browserstack": "node bin/run-browserstack-tests.js", + "test:browserstack": "node bin/run-browserstack-tests.cjs", "test:wip": "vite build --mode development --minify false && testem ci", "type-check:internals": "tsc --noEmit", "type-check:handlebars": "tsc --noEmit --project packages/@handlebars/parser/tsconfig.json", diff --git a/rollup.config.mjs b/rollup.config.mjs index dce983cda52..aac5c953a52 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -12,8 +12,8 @@ const require = createRequire(import.meta.url); const { PackageCache, packageName } = require('@embroider/shared-internals'); const projectRoot = dirname(fileURLToPath(import.meta.url)); const packageCache = PackageCache.shared('ember-source', projectRoot); -const buildDebugMacroPlugin = require('./broccoli/build-debug-macro-plugin'); -const canaryFeatures = require('./broccoli/canary-features'); +const buildDebugMacroPlugin = require('./broccoli/build-debug-macro-plugin.cjs'); +const canaryFeatures = require('./broccoli/canary-features.cjs'); const testDependencies = [ 'qunit', diff --git a/smoke-tests/node-template/tests/node/overrides-test.js b/smoke-tests/node-template/tests/node/overrides-test.js index 9abb2c36fda..a759d64f049 100644 --- a/smoke-tests/node-template/tests/node/overrides-test.js +++ b/smoke-tests/node-template/tests/node/overrides-test.js @@ -4,7 +4,7 @@ import Project from './fixtures/project.js'; const require = createRequire(import.meta.url); const emberSourceRoot = dirname(require.resolve('ember-source/package.json')); -const Overrides = require(join(emberSourceRoot, 'lib', 'overrides')); +const Overrides = require(join(emberSourceRoot, 'lib', 'overrides.cjs')); function cmp(a, b) { if (a == undefined || a < b) { diff --git a/testem.browserstack.js b/testem.browserstack.cjs similarity index 100% rename from testem.browserstack.js rename to testem.browserstack.cjs diff --git a/testem.ci-browsers.js b/testem.ci-browsers.cjs similarity index 100% rename from testem.ci-browsers.js rename to testem.ci-browsers.cjs diff --git a/testem.js b/testem.cjs similarity index 100% rename from testem.js rename to testem.cjs diff --git a/tests/docs/coverage-test.js b/tests/docs/coverage-test.cjs similarity index 99% rename from tests/docs/coverage-test.js rename to tests/docs/coverage-test.cjs index ecb696da3a3..09aa2579d81 100644 --- a/tests/docs/coverage-test.js +++ b/tests/docs/coverage-test.cjs @@ -9,7 +9,7 @@ QUnit.module('Docs coverage', function (hooks) { buildDocs(); } docs = require(path.join(__dirname, '../../docs/data.json')); - expected = require('./expected'); + expected = require('./expected.cjs'); }); QUnit.module('classitems', function (hooks) { diff --git a/tests/docs/expected.js b/tests/docs/expected.cjs similarity index 100% rename from tests/docs/expected.js rename to tests/docs/expected.cjs diff --git a/tests/node/build-info-test.js b/tests/node/build-info-test.cjs similarity index 99% rename from tests/node/build-info-test.js rename to tests/node/build-info-test.cjs index aede531aa48..28eabdef95a 100644 --- a/tests/node/build-info-test.js +++ b/tests/node/build-info-test.cjs @@ -1,6 +1,6 @@ 'use strict'; -const { buildVersion, parseTagVersion, buildFromParts } = require('../../broccoli/build-info'); +const { buildVersion, parseTagVersion, buildFromParts } = require('../../broccoli/build-info.cjs'); QUnit.module('buildVersion', () => { flatMap( diff --git a/yuidoc.json b/yuidoc.json index 568ad183b17..41926aecd28 100644 --- a/yuidoc.json +++ b/yuidoc.json @@ -15,6 +15,6 @@ ], "exclude": "vendor", "outdir": "docs", - "preprocessor": "bin/feature-flag-yuidoc-filter" + "preprocessor": "bin/feature-flag-yuidoc-filter.cjs" } }