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: 4 additions & 4 deletions .github/workflows/alpha-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ 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

release:
name: Tag + Push
runs-on: ubuntu-latest
needs: [ tests ]
needs: [tests]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# nightly ci cron branches
- cron*
paths-ignore:
- 'CHANGELOG.md'
- "CHANGELOG.md"
pull_request:

permissions:
Expand All @@ -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
26 changes: 13 additions & 13 deletions .github/workflows/publish-to-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
8 changes: 4 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions babel.test.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -22,7 +22,7 @@ export default {
[
'@babel/preset-env',
{
targets: require('./config/targets.js'),
targets: require('./config/targets.cjs'),
},
],
],
Expand Down
2 changes: 1 addition & 1 deletion bin/benchmark.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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\`.
`);
Expand Down
7 changes: 6 additions & 1 deletion bin/benchmark/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Comment thread
NullVoxPopuli marked this conversation as resolved.
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');
Expand Down
Comment thread
NullVoxPopuli marked this conversation as resolved.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const FEATURES = require('../broccoli/features');
const FEATURES = require('../broccoli/features.cjs');

function isClassToBeIncluded(item, featuresToFilter) {
if (item.category) {
Expand Down
Comment thread
NullVoxPopuli marked this conversation as resolved.
File renamed without changes.
4 changes: 2 additions & 2 deletions bin/publish-to-s3.mjs
Original file line number Diff line number Diff line change
@@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const FEATURES = require('./features');
const FEATURES = require('./features.cjs');

module.exports = function canaryFeatures() {
return [
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/browserlists.js → config/browserlists.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const allSupportedBrowsers = require('../lib/browsers');
const allSupportedBrowsers = require('../lib/browsers.cjs');

const modernBrowsers = [
'last 1 Chrome versions',
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion config/targets.js → config/targets.cjs
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down
7 changes: 7 additions & 0 deletions eslint-rules/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

module.exports = {
rules: {
'no-barrel-imports': require('./no-barrel-imports.cjs'),
},
};
9 changes: 0 additions & 9 deletions eslint-rules/index.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
'use strict';

const fs = require('node:fs');
Expand Down
Loading
Loading