From 49c2f074a3ee51c9c8d851d806e28f48f7c8e29a Mon Sep 17 00:00:00 2001 From: Oleg Krechkovskiy Date: Wed, 23 Aug 2023 19:32:14 +0300 Subject: [PATCH 1/2] [fix-npm-versions] Updated modules. Fixed bug in "gulp-imagemin" module. - The new version of the "gulp-imagemin" module gave an error on startup - "Error [ERR_REQUIRE_ESM]: require() ES module /../../uploader-work-space/node_modules/gulp-imagemin/index.js from /../../uploader-work-space/insales-config .js is not supported." - Fixed by adding a dynamic import function to import the module at the specified path. --- insales-config.js | 5 ++++- package.json | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/insales-config.js b/insales-config.js index d9e19bd..3723c90 100644 --- a/insales-config.js +++ b/insales-config.js @@ -1,6 +1,9 @@ var extend = require('deepmix') var fs = require('fs') -var imagemin = require('gulp-imagemin') +// var imagemin = require('gulp-imagemin') +async function imagemin() { + const { default: imagemin } = await import('./node_modules/gulp-imagemin'); +} var autoprefixer = require('insales-uploader-autoprefixer') var jsValidate = require('gulp-jsvalidate'); diff --git a/package.json b/package.json index 0f1c703..6cd64d0 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "uploader-work-space", - "version": "0.3.0", + "version": "0.4.0", "description": "To work with Insales", "main": "insales-config.js", "dependencies": { "deepmix": "^1.0.0", - "gulp-imagemin": "^4.1.0", - "gulp-jsvalidate": "^4.0.0", - "insales-uploader": "^1.12.6", + "gulp-imagemin": "^8.0.0", + "gulp-jsvalidate": "^5.0.0", + "insales-uploader": "^1.13.2", "insales-uploader-autoprefixer": "^1.0.1" }, "browserslist": [ From 4e7a2c6f5d88803297402b9a4280f67bccfd2cbc Mon Sep 17 00:00:00 2001 From: Oleg Krechkovskiy Date: Wed, 23 Aug 2023 20:35:04 +0300 Subject: [PATCH 2/2] Added package installation check --- .github/workflows/github-actions.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/github-actions.yml diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 0000000..a0fce81 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,15 @@ +name: package installation test +run-name: Perform a test installation of packages 🚀 +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: install modules + run: npm cli + - run: echo "🖥️ npm install is ready" \ No newline at end of file