Skip to content

Commit

Permalink
Merge pull request #123 from Chia-Network/develop
Browse files Browse the repository at this point in the history
release 1.7.13
  • Loading branch information
TheLastCicada authored Nov 4, 2024
2 parents 64d815f + 6e36c07 commit 77db8ab
Show file tree
Hide file tree
Showing 55 changed files with 4,918 additions and 1,285 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)],
},
],
]
],
};
16 changes: 8 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Node 18.x
- name: Setup Node 20.x
uses: actions/setup-node@v3
with:
node-version: '18.16'
node-version: '20.16'

- name: Install Husky
run: npm install --save-dev husky
Expand Down Expand Up @@ -286,10 +286,10 @@ jobs:
run: |
echo "REPO_NAME=$(echo "$GITHUB_REPOSITORY" | cut -d "/" -f 2)" >>$GITHUB_OUTPUT
- name: Gets JWT Token from GitHub
uses: Chia-Network/actions/github/jwt@main

- name: Trigger apt repo update
run: |
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"[\"core-registry-cadt\"]","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}' ${{ secrets.GLUE_API_URL }}/api/v1/climate-tokenization/${{ github.sha }}/start
curl -s -XPOST -H "Authorization: Bearer ${{ env.JWT_TOKEN }}" --data '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"[\"core-registry-cadt\"]","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}' ${{ secrets.GLUE_API_URL }}/api/v1/climate-tokenization/${{ github.sha }}/success/deploy
uses: Chia-Network/actions/github/glue@main
with:
json_data: '{"climate_tokenization_repo":"${{ steps.repo-name.outputs.REPO_NAME }}","application_name":"[\"core-registry-cadt\"]","release_version":"${{ steps.tag-name.outputs.TAGNAME }}","add_debian_version":"true","arm64":"available"}'
glue_url: ${{ secrets.GLUE_API_URL }}
glue_project: "climate-tokenization"
glue_path: "trigger"
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
name: NPM Tests
runs-on: ubuntu-latest
container:
image: node:18.16
image: node:20.16

steps:
- uses: Chia-Network/actions/clean-workspace@main
Expand Down
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
179 changes: 134 additions & 45 deletions README.md

Large diffs are not rendered by default.

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');
});
});
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import mocha from "eslint-plugin-mocha";
import es from "eslint-plugin-es";
import globals from "globals";
import babelParser from "@babel/eslint-parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("eslint:recommended", "plugin:mocha/recommended"), {
plugins: {
mocha,
es,
},

languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
},

parser: babelParser,
ecmaVersion: 13,
sourceType: "module",

parserOptions: {
requireConfigFile: false,
},
},

settings: {
es: {
deprecatedAssertSyntax: true,
allowImportExportEverywhere: true,
importAssertions: true,
},
},

rules: {
"es/no-dynamic-import": "error",
},
}];
Loading

0 comments on commit 77db8ab

Please sign in to comment.