Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support Node < 16 and babel < 7 #91

Merged
merged 13 commits into from
Apr 10, 2024
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
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

23 changes: 0 additions & 23 deletions .eslintrc.js

This file was deleted.

35 changes: 29 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,42 @@ on:
branches: [ master ]

jobs:
build:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- run: pnpm install
- run: pnpm lint

build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 15.x]
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --ignore-engines
- run: yarn test
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm install
- run: pnpm test
33 changes: 33 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js';
import prettier from 'eslint-plugin-prettier/recommended';
import node from 'eslint-plugin-n';
import globals from 'globals';

export default [
js.configs.recommended,
prettier,
node.configs['flat/recommended-module'],
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.node,
},
},
rules: {
'prettier/prettier': 'error',
},
},
{
files: ['tests/**/*.js'],
languageOptions: {
globals: {
...globals.jest,
},
},
},
{
ignores: ['fixtures/**'],
},
];
2 changes: 0 additions & 2 deletions fixtures/assert-expansion/expectation6.js

This file was deleted.

5 changes: 0 additions & 5 deletions fixtures/debug-flag/expectation6.js

This file was deleted.

4 changes: 1 addition & 3 deletions fixtures/debug-flag/expectation7.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
if (true
/* DEBUG */
) {
if (true/* DEBUG */) {
console.log('woot');
}
5 changes: 0 additions & 5 deletions fixtures/default-export-features/expectation6.js

This file was deleted.

7 changes: 0 additions & 7 deletions fixtures/deprecate-expansion/expectation6.js

This file was deleted.

8 changes: 0 additions & 8 deletions fixtures/development-feature-flags/expectation6.js

This file was deleted.

37 changes: 0 additions & 37 deletions fixtures/development-svelte-builds/expectation6.js

This file was deleted.

20 changes: 5 additions & 15 deletions fixtures/development-svelte-builds/expectation7.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
export let PartialComponentManager;

if (false
/* DEPRECATED_PARTIALS */
) {
if (false/* DEPRECATED_PARTIALS */) {
PartialComponentManager = class {
constructor() {
this.isDone = true;
Expand All @@ -11,29 +9,21 @@ if (false
};
}

if (false
/* DEPRECATED_PARTIALS */
&& someOtherThing()) {
if (false/* DEPRECATED_PARTIALS */&& someOtherThing()) {
doStuff();
}

if (!false
/* DEPRECATED_PARTIALS */
&& someOtherThing()) {
if (!false/* DEPRECATED_PARTIALS */&& someOtherThing()) {
doStuff2();
}

if (false
/* DEPRECATED_PARTIALS */
=== false && someOtherThing()) {
if (false/* DEPRECATED_PARTIALS */=== false && someOtherThing()) {
doStuff3();
}

export let ObjectController;

if (true
/* DEPRECATED_CONTROLLERS */
) {
if (true/* DEPRECATED_CONTROLLERS */) {
ObjectController = class {
constructor() {
this.isDoneAsWell = true;
Expand Down
5 changes: 0 additions & 5 deletions fixtures/does-not-modify-non-imported-flags/expectation6.js

This file was deleted.

14 changes: 0 additions & 14 deletions fixtures/ember-cli-babel-config-pre-3-27/expectation6.js

This file was deleted.

4 changes: 1 addition & 3 deletions fixtures/ember-cli-babel-config-pre-3-27/expectation7.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
if (true
/* DEBUG */
) {
if (true/* DEBUG */) {
doStuff();
}

Expand Down
15 changes: 0 additions & 15 deletions fixtures/ember-cli-babel-config/expectation6.js

This file was deleted.

4 changes: 1 addition & 3 deletions fixtures/ember-cli-babel-config/expectation7.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { warn, assert, deprecate } from '@ember/debug';

if (true
/* DEBUG */
) {
if (true/* DEBUG */) {
doStuff();
}

Expand Down
7 changes: 0 additions & 7 deletions fixtures/global-external-helpers/expectation6.js

This file was deleted.

7 changes: 0 additions & 7 deletions fixtures/hygenic-debug-injection/expectation6.js

This file was deleted.

11 changes: 0 additions & 11 deletions fixtures/inject-env-flags/expectation6.js

This file was deleted.

8 changes: 2 additions & 6 deletions fixtures/inject-env-flags/expectation7.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
let testing;

if (false
/* TESTING */
) {
if (false/* TESTING */) {
testing = 'WOOT';
}

let debug;

if (true
/* DEBUG */
) {
if (true/* DEBUG */) {
debug = 'DEBUG';
}
18 changes: 0 additions & 18 deletions fixtures/inline-feature-flags/expectation6.js

This file was deleted.

20 changes: 5 additions & 15 deletions fixtures/inline-feature-flags/expectation7.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,17 @@
let a;

if (false
/* FEATURE_A */
) {
if (false/* FEATURE_A */) {
a = () => console.log('hello');
} else if (true
/* FEATURE_B */
) {
} else if (true/* FEATURE_B */) {
a = () => console.log('bye');
}

if (!false
/* FEATURE_A */
) {
if (!false/* FEATURE_A */) {
console.log('stuff');
}

a = false
/* FEATURE_A */
? 'hello' : 'bye';
a = false/* FEATURE_A */ ? 'hello' : 'bye';

if (false
/* FEATURE_A */
&& window.foo && window.bar) {
if (false/* FEATURE_A */&& window.foo && window.bar) {
console.log('wheeee');
}
Loading
Loading