diff --git a/.eslintignore b/.eslintignore index 7e0cec355..2154f9afa 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,6 @@ node_modules dist publicodes/example/ + +# TODO fix weird error in ./exoneration-covid/index.d.ts : Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser. +exoneration-covid/index.d.ts \ No newline at end of file diff --git a/exoneration-covid/.yarnrc b/exoneration-covid/.yarnrc index 803b9f31c..816ae2805 100644 --- a/exoneration-covid/.yarnrc +++ b/exoneration-covid/.yarnrc @@ -1,2 +1,2 @@ -version-tag-prefix exonération-covid.publicodes -v -version-git-message "⬆ Mise à jour du paquet \"exonération-covid.publicodes \" vers %s" +version-tag-prefix exoneration-covid -v +version-git-message "⬆ Mise à jour du paquet \"exoneration-covid \" vers %s" diff --git a/scripts/build-rules.js b/scripts/build-rules.js index a7599b69f..83d59a36d 100644 --- a/scripts/build-rules.js +++ b/scripts/build-rules.js @@ -43,7 +43,7 @@ function readRules() { // Note: we can't put the output file in the fs.watched directory -function writeJSFile() { +export default function writeJSFile() { const rules = readRules() const names = Object.keys(rules) const jsString = `export default ${JSON.stringify(rules, null, 2)}` @@ -55,6 +55,3 @@ function writeJSFile() { } writeJSFile() -export function watchDottedNames() { - return fs.watch(publicodesDir, writeJSFile) -} diff --git a/scripts/check-changelog.js b/scripts/check-changelog.js index e875c9c28..995cc3543 100644 --- a/scripts/check-changelog.js +++ b/scripts/check-changelog.js @@ -1,13 +1,9 @@ // Ensure that current package version is referenced in the Changelog.md import { readFileSync } from 'fs' -const packageVersion = JSON.parse( - readFileSync(new URL('./package.json', import.meta.url).pathname) -).version +const packageVersion = JSON.parse(readFileSync('./package.json')).version -const changelog = readFileSync( - new URL('./CHANGELOG.md', import.meta.url).pathname -) +const changelog = readFileSync('./CHANGELOG.md') if (!changelog.includes(`## ${packageVersion}\n`)) { throw Error( diff --git a/site/vite.config.ts b/site/vite.config.ts index 0bc5b4d73..56943c32c 100644 --- a/site/vite.config.ts +++ b/site/vite.config.ts @@ -5,7 +5,6 @@ import fs from 'fs/promises' import path from 'path' import toml from 'rollup-plugin-toml' import { defineConfig, Plugin } from 'vite' -import { watchDottedNames } from '../scripts/build-rules' import shimReactPdf from 'vite-plugin-shim-react-pdf' import serveStatic from 'serve-static' @@ -162,7 +161,7 @@ function monEntrepriseDevServer(): Plugin { configureServer() { // We could use native ViteJS watch API, but it would require changing // more code and maybe the whole "modele-social" package build process. - watchDottedNames() + // watchDottedNames() }, } }