Skip to content

Commit 155c7c5

Browse files
authored
fix: refactor presets import to use JSON module syntax (#516)
* fix: refactor presets import to use JSON module syntax * chore: remove coverage from ci Removed Coverage job from GitHub Actions workflow and updated Release job dependencies.
1 parent feb01e3 commit 155c7c5

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,6 @@ jobs:
2525
npm run func-test
2626
npm run logger-test
2727
28-
Coverage:
29-
if: "!contains(github.event.head_commit.message, '[skip ci]')"
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Checkout Code
33-
uses: actions/checkout@v5
34-
- name: Install Node
35-
uses: actions/setup-node@v6
36-
with:
37-
node-version: 'lts/*'
38-
- name: Install Dependencies
39-
run: npm ci
40-
- name: Run Tests 👩🏽‍💻
41-
run: npm run cover
42-
4328
Lint:
4429
if: "!contains(github.event.head_commit.message, '[skip ci]')"
4530
runs-on: ubuntu-latest
@@ -56,7 +41,7 @@ jobs:
5641
run: npm run lint
5742

5843
Release:
59-
needs: [Test, Coverage, Lint]
44+
needs: [Test, Lint]
6045
if: github.ref == 'refs/heads/master'
6146
runs-on: ubuntu-latest
6247
steps:

lib/defaults.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
import { createRequire } from 'module';
2-
const require = createRequire(import.meta.url);
1+
import bem from '../presets/bem.json' with { type: 'json' };
32

4-
export const presets = {
5-
bem: require('../presets/bem.json'),
6-
};
3+
export const presets = { bem };
74

85
/**
96
* Sets options

0 commit comments

Comments
 (0)