diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9ffa242..e512269 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -73,7 +73,7 @@ jobs: VALIDATE_JSON_PRETTIER: true VALIDATE_JSX_PRETTIER: true VALIDATE_MARKDOWN_PRETTIER: true - VALIDATE_NATURAL_LANGUAGE: true + # VALIDATE_NATURAL_LANGUAGE: true VALIDATE_TSX: true VALIDATE_TYPESCRIPT_PRETTIER: true VALIDATE_YAML: true # turning on for now while prettier is broken diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0c7e990..c88f4be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,8 +1,5 @@ name: Publish -# @TODO: check if this could replace changesets -# if so, i can get rid of the publish command and changesets - on: # yamllint disable-line rule:truthy push: branches: @@ -26,15 +23,16 @@ jobs: # the workflow run. For example, `main` or `1.x` target-branch: ${{ github.ref_name }} + publish-npm: + name: Publish to NPM + runs-on: ubuntu-latest + needs: release + steps: - uses: actions/checkout@v4 name: Checkout repository - # these if statements ensure that a publication only occurs when - # a new release is created: - if: ${{ steps.release.outputs.release_created }} - uses: actions/setup-node@v4 name: Setup Node.js @v20 - if: ${{ steps.release.outputs.release_created }} with: cache: npm node-version: 20.x @@ -42,20 +40,32 @@ jobs: - run: npm ci name: Install dependencies - if: ${{ steps.release.outputs.release_created }} - - run: npm publish --access public + - run: npm publish name: Publish to NPM env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - if: ${{ steps.release.outputs.release_created }} - - run: npm config set registry https://npm.pkg.github.com/ - name: Set up GitHub registry - if: ${{ steps.release.outputs.release_created }} + publish-gh: + name: Publish to GitHub + runs-on: ubuntu-latest + needs: release + steps: + - uses: actions/checkout@v4 + name: Checkout repository + + - uses: actions/setup-node@v4 + name: Setup Node.js @v20 + with: + cache: npm + node-version: 20.x + registry-url: 'https://npm.pkg.github.com' + scope: '@theholocron' + + - run: npm ci + name: Install dependencies - run: npm publish --access public name: Publish to GitHub Packages env: NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} - if: ${{ steps.release.outputs.release_created }} diff --git a/.textlintignore b/.textlintignore deleted file mode 100644 index 1b763b1..0000000 --- a/.textlintignore +++ /dev/null @@ -1 +0,0 @@ -CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 290445f..530cb2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,10 +2,9 @@ ## [0.2.1](https://github.com/theholocron/react-template/compare/v0.2.0...v0.2.1) (2024-10-25) - ### Bug Fixes -* 💚 enable publish to npm, gh ([#12](https://github.com/theholocron/react-template/issues/12)) ([a2fed19](https://github.com/theholocron/react-template/commit/a2fed19a61e8384574c5cec85c6f2591177f554b)) +- 💚 enable publish to npm, gh ([#12](https://github.com/theholocron/react-template/issues/12)) ([a2fed19](https://github.com/theholocron/react-template/commit/a2fed19a61e8384574c5cec85c6f2591177f554b)) ## [0.2.0](https://github.com/theholocron/react-template/compare/v0.1.0...v0.2.0) (2024-10-25) diff --git a/cypress.config.js b/cypress.config.ts similarity index 95% rename from cypress.config.js rename to cypress.config.ts index 55d3617..e774a4b 100644 --- a/cypress.config.js +++ b/cypress.config.ts @@ -8,6 +8,7 @@ export default defineConfig({ baseUrl: "http://localhost:5173/", // this is the default port for `vite` that runs a server specPattern: "src/**/*.{cy.js,cy.ts}", supportFile: false, + retries: 2, }, projectId: "6dsxao", }); diff --git a/package-lock.json b/package-lock.json index bd238d3..11e279a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,6 +26,10 @@ "react-dom": "^18.3.1", "vite": "^5.4.9" }, + "engines": { + "node": ">=23", + "npm": ">=10" + }, "peerDependencies": { "react": "^18.3.1", "react-dom": "^18.3.1" @@ -19377,46 +19381,6 @@ "node": ">=0.10.0" } }, - "node_modules/lpad-align/node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lpad-align/node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lpad-align/node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lpad-align/node_modules/read-pkg-up": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", @@ -23992,6 +23956,70 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "node_modules/read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", + "dev": true, + "dependencies": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/read-yaml-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz", diff --git a/package.json b/package.json index 1595b58..dd12cea 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "version": "0.2.1", "repository": { "type": "git", - "url": "git+https://github.com/theholocron/react-template.git" + "url": "https://github.com/theholocron/react-template.git" }, "bugs": "https://github.com/theholocron/react-template/issues", "releases": "https://github.com/theholocron/react-template/releases", @@ -58,6 +58,10 @@ "test:cypress": "cypress open", "test:storybook": "test-storybook --coverage" }, + "engines": { + "node": ">=23", + "npm": ">=10" + }, "devDependencies": { "@changesets/changelog-github": "^0.5.0", "@changesets/cli": "^2.27.9",