From 498b0eff2c0a718ab982897a1f64e501d8e62735 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 3 Jun 2024 20:08:10 +0200 Subject: [PATCH] rearranging package.json files - global is for testing & building - nette-forms moved to src/assets --- .github/workflows/tests.yml | 6 ++-- eslint.config.mjs => eslint.config.js | 0 package.json | 31 ++++++------------- src/assets/package.json | 18 +++++++++++ .../{karma.conf.js => karma.conf.cjs} | 0 tests/netteForms/package.json | 10 ------ 6 files changed, 29 insertions(+), 36 deletions(-) rename eslint.config.mjs => eslint.config.js (100%) create mode 100644 src/assets/package.json rename tests/netteForms/{karma.conf.js => karma.conf.cjs} (100%) delete mode 100644 tests/netteForms/package.json diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2d1775889..90de7de98 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -65,8 +65,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: npm install -g karma-cli + - run: npm install - working-directory: tests/netteForms - run: npm install - - working-directory: tests/netteForms - run: karma start + run: npx karma start karma.conf.cjs diff --git a/eslint.config.mjs b/eslint.config.js similarity index 100% rename from eslint.config.mjs rename to eslint.config.js diff --git a/package.json b/package.json index 9a73a127b..daa493e12 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,13 @@ { - "name": "nette-forms", - "version": "3.4.1", - "description": "Client side script for Nette Forms Component", - "keywords": [ - "nette", - "validation", - "forms" - ], - "homepage": "https://nette.org", - "author": "David Grudl (https://davidgrudl.com)", - "license": "BSD-3-Clause", - "main": "src/assets/netteForms.js", - "files": [ - "src/assets" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/nette/forms.git" - }, + "type": "module", "devDependencies": { - "@eslint/js": "^9.1.1", - "eslint": "^9.1.1", - "globals": "^15.1.0" + "@eslint/js": "^9.4.0", + "eslint": "^9.4.0", + "globals": "^15.3.0", + "jasmine": "^5.1.0", + "jasmine-core": "^5.1.1", + "karma": "^6.4.2", + "karma-chrome-launcher": "^3.2.0", + "karma-jasmine": "^5.1.0" } } diff --git a/src/assets/package.json b/src/assets/package.json new file mode 100644 index 000000000..557deab2e --- /dev/null +++ b/src/assets/package.json @@ -0,0 +1,18 @@ +{ + "name": "nette-forms", + "version": "3.4.1", + "description": "Client side script for Nette Forms Component", + "keywords": [ + "nette", + "validation", + "forms" + ], + "homepage": "https://nette.org", + "author": "David Grudl (https://davidgrudl.com)", + "license": "BSD-3-Clause", + "main": "netteForms.js", + "repository": { + "type": "git", + "url": "git+https://github.com/nette/forms.git" + } +} diff --git a/tests/netteForms/karma.conf.js b/tests/netteForms/karma.conf.cjs similarity index 100% rename from tests/netteForms/karma.conf.js rename to tests/netteForms/karma.conf.cjs diff --git a/tests/netteForms/package.json b/tests/netteForms/package.json deleted file mode 100644 index 2b519789e..000000000 --- a/tests/netteForms/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "devDependencies": { - "eslint": "^8.52.0", - "jasmine": "^5.1.0", - "jasmine-core": "^5.1.1", - "karma": "^6.4.2", - "karma-chrome-launcher": "^3.2.0", - "karma-jasmine": "^5.1.0" - } -}