Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: merge with master and update to latest Slickgrid-Universal #1119

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
# Contributing
If you wish to contribute then make sure to follow these steps (note that we use [Yarn classic](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable) in this project):
```sh
# step 1, install with Yarn classic
yarn install

We'd love for you to contribute and to make this project even better than it is today! If this interests you, please begin by reading the project [Wiki documentation](https://github.com/ghiscoding/aurelia-slickgrid/wiki). Once you consulted them and you believe that you can help us with new features, improvement or even fixes then go ahead and submit a Pull Request.
# step 2, run in dev and test your code change
yarn yarn start:dev

When we mention `VSCode`, we mean `Visual Studio Code` editor which can be downloaded [here](https://code.visualstudio.com)
# step 3.a, build plugin (lib)
yarn build

Before accepting any Pull Request, we need to make sure that you followed these steps:
1. Install `Yarn` globally since it is used in all `package.json` scripts and VSCode Tasks if you want to use them.
2. Have you tested all your changes?
- you can test `Aurelia-Slickgrid` by going into the folder `aurelia-slickgrid/aurelia-slickgrid`, run `npm install` and finally change your directory back to the root of the project and run `npm run start:dev` (or even easier if you use VSCode, just run the task "Start Library Development")
3. Have you run the TypeScript Build?
- you can run the build with `npm run build` from the root of the project (or with VSCode, run the task "Build Library")
4. If you did step 2 and 3, then the final step would be the Pull Request... but wait! For readability purposes, we would like you to only submit the relevant pieces of code that you changed. We are basically asking you to do a Build and make sure there's no errors (Yes please) but to not include the produced `dist` folder. We just want to see the real changes, nothing else (but we still want to make sure it Builds before creating a PR).
# step 3.b, optional website build as well
yarn build:demo

# step 4, to test the E2E tests with Cypress the E2E tests
yarn cypress:open # open Cypress UI then click on "Run All Specs" or choose dedicated Example to test
```
2 changes: 1 addition & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
allowedVersions: "8.5.0",
}
],
schedule: ['on friday and tuesday'],
schedule: ['every 2 weeks on thursday'],
ignoreDeps: ["typescript"],
}
23 changes: 13 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run:
name: Node ${{ matrix.node }}
Expand All @@ -18,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [18]
node: [20]

steps:
- name: Clone repository
Expand All @@ -27,7 +31,7 @@ jobs:
fetch-depth: 3

- name: Set Node.js version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand Down Expand Up @@ -60,20 +64,19 @@ jobs:
directory: test/jest-coverage
verbose: true

- name: Prod Build for GitHub demo website (required for Cypress)
- name: Website Dev Build (served for Cypress)
run: yarn build:demo

- name: Start HTTP Server
run: yarn serve:demo &

- name: Run Cypress E2E tests
uses: cypress-io/github-action@59810ebfa5a5ac6fcfdcfdf036d1cd4d083a88f2 # v6.5.0
uses: cypress-io/github-action@v6
with:
working-directory: test/cypress
config-file: cypress.config.ts
install: false
# working-directory: packages/dnd
start: yarn serve:demo
wait-on: "http://localhost:9000"
config-file: test/cypress.config.ts
browser: chrome
record: true
record: false
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/publish-dry-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: 🏷️👀 Publish (dry-run)

on: workflow_dispatch

permissions:
contents: write
id-token: write

jobs:
deploy-npm-latest:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Retrieve current Date Time in EST
shell: bash
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV

- name: Current datetime - ${{ env.START_TIME }}
run: echo ${{ env.START_TIME }}

- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ github.event.pull_request.merged != true && contains('["ghiscoding"]', github.actor) != true }}
name: Ensure current actor is allowed to run the workflow
run: |
echo "Error: Your GitHub username (${{ github.actor }}) is not on the allowed list of admins for this workflow"
exit 1

- name: Set NodeJS
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org/'
node-version: 20

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run yarn install dependencies
run: yarn --frozen-lockfile

- name: Run Project Build
run: yarn run build

- name: "[dry-run] 🧪 NPM Release"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
npm whoami
npx release-it --ci --dry-run
75 changes: 75 additions & 0 deletions .github/workflows/publish-npm-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 🏷️ Publish NPM Latest

on: workflow_dispatch

permissions:
contents: write
id-token: write

jobs:
deploy-npm-latest:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Retrieve current Date Time in EST
shell: bash
run: echo "START_TIME=$(TZ=":America/New_York" date -R|sed 's/.....$//')" >> $GITHUB_ENV

- name: Current datetime - ${{ env.START_TIME }}
run: echo ${{ env.START_TIME }}

- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- if: ${{ github.event.pull_request.merged != true && contains('["ghiscoding"]', github.actor) != true }}
name: Ensure current actor is allowed to run the workflow
run: |
echo "Error: Your GitHub username (${{ github.actor }}) is not on the allowed list of admins for this workflow"
exit 1

- name: Set NodeJS
uses: actions/setup-node@v4
with:
registry-url: 'https://registry.npmjs.org/'
node-version: 20

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Run yarn install dependencies
run: yarn --frozen-lockfile

- name: Run Project Build
run: yarn run build

- name: OTP
uses: step-security/wait-for-secrets@v1
id: wait-for-secrets
with:
secrets: |
OTP:
name: 'OTP to publish package'
description: 'OTP from authenticator app'

- name: GitHub Release 🏷️ / NPM Publish 📦
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
npm whoami
npx release-it --ci --npm.otp=${{ steps.wait-for-secrets.outputs.OTP }}
17 changes: 11 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
.github
.idea
.vscode
.codecov.yml
aurelia-project
CHANGELOG.md
CONTRIBUTING.md
cypress
cypress.json
Expand All @@ -13,12 +12,8 @@ doc
src
ISSUE_TEMPLATE.md
index.ejs
index.html
jest.conf.js
npm-debug.log
package-scripts.js
screenshots
test
webpack.config.js

**/dist-demo
Expand All @@ -28,11 +23,14 @@ favicon.ico
tsconfig.spec.json

# Lock & error files
npm-debug.log
yarn.lock
yarn-error.log

# Tests, Report & Coverage
.codecov.yml
*.spec.ts
jest.conf.js
test/
**/node_modules
**/coverage
Expand All @@ -43,3 +41,10 @@ test/
**/test-report.xml
**/testresult.xml

# code editor & linter
.env
.editorconfig
.eslintignore
.eslintrc
.hintrc
.release-it.json
3 changes: 3 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"release": true,
"releaseName": "v${version}"
},
"npm": {
"publish": true
},
"hooks": {
"before:init": [
"npm run lint"
Expand Down
Loading