From 752b1db5c1ba24fcef0c5ae777f5a5cae44b3076 Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:06:53 +0200 Subject: [PATCH 1/8] IMP: update minimal node version to match TailwindCSS --- package.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 75b4438..04c05f7 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ }, "description": "Hyvä-themes TailwindCSS utility functions", "main": "src/index.js", + "engines": { + "node": ">=14.0.0" + }, "scripts": { "test": "jest" }, @@ -21,7 +24,5 @@ "dependencies": { "deepmerge": "^4.2.2" }, - "engines" : { - "node" : ">=12.13.0" } } From 60c49dad77b9af0ef7c7aa0bf99dd30833b9b751 Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:07:52 +0200 Subject: [PATCH 2/8] ADD: missing url to bugs --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 04c05f7..19f358e 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.0.9", "homepage": "https://hyva.io", "bugs": { + "url": "https://github.com/hyva-themes/hyva-modules-tailwind-js/issues", "email": "info@hyva.io" }, "description": "Hyvä-themes TailwindCSS utility functions", From b89ca8be6218b38cda0cc33aac4acb2b0d39c992 Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:08:03 +0200 Subject: [PATCH 3/8] IMP: sort order --- package.json | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 19f358e..9e06953 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,17 @@ { "name": "@hyva-themes/hyva-modules", "version": "1.0.9", + "description": "Hyvä-themes TailwindCSS utility functions", "homepage": "https://hyva.io", + "repository": { + "type": "git", + "url": "https://github.com/hyva-themes/hyva-modules-tailwind-js.git" + }, "bugs": { "url": "https://github.com/hyva-themes/hyva-modules-tailwind-js/issues", "email": "info@hyva.io" }, - "description": "Hyvä-themes TailwindCSS utility functions", + "license": "BSD-3-Clause", "main": "src/index.js", "engines": { "node": ">=14.0.0" @@ -14,16 +19,10 @@ "scripts": { "test": "jest" }, - "license": "BSD-3-Clause", - "repository": { - "type": "git", - "url": "https://github.com/hyva-themes/hyva-modules-tailwind-js.git" - }, - "devDependencies": { - "jest": "^27.5.1" - }, "dependencies": { "deepmerge": "^4.2.2" }, + "devDependencies": { + "jest": "^27.5.1" } } From 03276f8a1e055d18a3441bf453c5af37e92b1cd5 Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:08:23 +0200 Subject: [PATCH 4/8] ADD: github workflow --- .github/workflows/npm-publish.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..b451e75 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,38 @@ +# This workflow will run tests using node +# then publish a package to NPM Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +env: + NODE: 20 + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '${{ env.NODE }}' + - run: npm ci + - run: npm test + + publish-npm: + if: github.repository == 'hyva-themes/hyva-modules-tailwind-js' + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '${{ env.NODE }}' + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From b4d8faecd8316875e9755a60d309d89bddd45210 Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:35:14 +0200 Subject: [PATCH 5/8] ADD: keywords --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 9e06953..0bf936b 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,11 @@ "engines": { "node": ">=14.0.0" }, + "keywords": [ + "hyva", + "magento2", + "tailwindcss" + ], "scripts": { "test": "jest" }, From 4e8ad5e0c624698a06631330b4e2974c0001d1fe Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:46:28 +0200 Subject: [PATCH 6/8] ADD: github workflow --- .github/workflows/npm-publish.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index b451e75..1804fb8 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -9,19 +9,9 @@ on: types: [created] env: - NODE: 20 + NODE: 18 jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '${{ env.NODE }}' - - run: npm ci - - run: npm test - publish-npm: if: github.repository == 'hyva-themes/hyva-modules-tailwind-js' needs: build From 1d8425ad03e157ba41bde764b80e928f1a790842 Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 12:53:34 +0200 Subject: [PATCH 7/8] ADD: github workflow --- .github/workflows/npm-publish.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1804fb8..15c05b8 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,12 +1,12 @@ # This workflow will run tests using node # then publish a package to NPM Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages +# For more information see: https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages -name: Node.js Package +name: Publish Package to npmjs on: release: - types: [created] + types: [published] env: NODE: 18 @@ -17,12 +17,12 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: '${{ env.NODE }}' registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm publish --access public env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From fbee0c8d80eb352ec4375d865ebc468326da59ec Mon Sep 17 00:00:00 2001 From: grimlink Date: Mon, 21 Oct 2024 13:04:46 +0200 Subject: [PATCH 8/8] FIX: comment --- .github/workflows/npm-publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 15c05b8..318a831 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,5 +1,4 @@ -# This workflow will run tests using node -# then publish a package to NPM Packages when a release is created +# This workflow will publish a package to NPM Packages when a release is created # For more information see: https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages name: Publish Package to npmjs