Skip to content

Commit

Permalink
feat: node 20 update complete
Browse files Browse the repository at this point in the history
feat: builds working
  • Loading branch information
wwills2 committed Aug 8, 2024
1 parent b31242c commit c51ca8b
Show file tree
Hide file tree
Showing 10 changed files with 2,560 additions and 702 deletions.
8 changes: 5 additions & 3 deletions .babelrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ const jsConfig = require('./jsconfig.json');
module.exports = {
include: [/src/, /node_modules/],
presets: ['@babel/preset-env'],
targets: {
node: "20.16"
},
plugins: [
[
'@babel/plugin-syntax-import-attributes',
['@babel/plugin-syntax-import-attributes',
{
deprecatedAssertSyntax: true,
},
Expand All @@ -16,6 +18,6 @@ module.exports = {
{
root: [path.resolve(jsConfig.compilerOptions.baseUrl)],
},
],
]
],
};
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16
20.16
15 changes: 0 additions & 15 deletions babel.config.json

This file was deleted.

23 changes: 23 additions & 0 deletions change-build-package-type-commonjs.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
const fs = require('fs');
const path = require('path');

const packageJsonPath = path.resolve(__dirname, './build/package.json');

fs.readFile(packageJsonPath, 'utf8', (err, data) => {
if (err) {
console.error('Error reading package.json:', err);
process.exit(1);
}

const packageJson = JSON.parse(data);
packageJson.type = 'commonjs';

fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf8', (err) => {
if (err) {
console.error('Error writing package.json:', err);
process.exit(1);
}

console.log('build package.json type updated to commonjs');
});
});
Loading

0 comments on commit c51ca8b

Please sign in to comment.