Skip to content

Commit

Permalink
Dependency update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderOMara committed Aug 4, 2024
1 parent db85808 commit 5daaf44
Show file tree
Hide file tree
Showing 11 changed files with 964 additions and 1,834 deletions.
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

277 changes: 0 additions & 277 deletions .eslintrc.yaml

This file was deleted.

5 changes: 2 additions & 3 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ yarn.lock
/.gitignore
/.github
/.editorconfig
/.eslintignore
/.eslintrc.yaml
/.prettierrc.yaml
/.prettierignore
/babel.config.js
/babel.config.mjs
/eslint.config.mjs
/spec
/src

Expand Down
38 changes: 0 additions & 38 deletions babel.config.js

This file was deleted.

47 changes: 47 additions & 0 deletions babel.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import {readFileSync} from 'node:fs';

const {name, version, engines} = JSON.parse(readFileSync('./package.json'));

const node = engines.node
.split(/[^\d.]+/)
.filter(s => s.length)
.map(s => [...s.split('.').map(s => +s || 0), 0, 0].slice(0, 3))
.sort((a, b) => a[2] - b[2])
.sort((a, b) => a[1] - b[1])
.sort((a, b) => a[0] - b[0])[0]
.join('.');

export default api => {
const env = api.env();
api.cache(() => env);
return {
presets: [
[
'@babel/preset-env',
{
modules: 'commonjs',
targets: {
node
}
}
]
],
plugins: [
[
'search-and-replace',
{
rules: [
{
search: '#{VERSION}',
replace: version
},
{
search: '#{NAME}',
replace: name
}
]
}
]
]
};
};
Loading

0 comments on commit 5daaf44

Please sign in to comment.