-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Migrate to npm 7 #28115
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
Migrate to npm 7 #28115
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # This workflow is provided via the organization template repository | ||
| # | ||
| # https://github.com/nextcloud/.github | ||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
|
|
||
| name: Lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| - stable* | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| name: eslint | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Read package.json node and npm engines version | ||
| uses: skjnldsv/[email protected] | ||
| id: versions | ||
| with: | ||
| fallbackNode: '^12' | ||
| fallbackNpm: '^6' | ||
|
|
||
| - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: ${{ steps.versions.outputs.nodeVersion }} | ||
|
|
||
| - name: Set up npm ${{ steps.versions.outputs.npmVersion }} | ||
| run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Lint | ||
| run: npm run lint |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| name: Node | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - master | ||
| - stable* | ||
|
|
||
| jobs: | ||
| versions: | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| nodeVersion: ${{ steps.versions.outputs.nodeVersion }} | ||
| npmVersion: ${{ steps.versions.outputs.npmVersion }} | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Read package.json node and npm engines version | ||
| uses: skjnldsv/[email protected] | ||
| id: versions | ||
| with: | ||
| fallbackNode: '^12' | ||
| fallbackNpm: '^6' | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| needs: versions | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up node ${{ needs.versions.outputs.nodeVersion }} | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: ${{ needs.versions.outputs.nodeVersion }} | ||
|
|
||
| - name: Set up npm ${{ needs.versions.outputs.npmVersion }} | ||
| run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Test | ||
| run: npm run test | ||
|
|
||
| jsunit: | ||
| runs-on: ubuntu-latest | ||
| needs: versions | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up node ${{ needs.versions.outputs.nodeVersion }} | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: ${{ needs.versions.outputs.nodeVersion }} | ||
|
|
||
| # This test requires npm6 for some reason | ||
| # TODO: fix this and/or move away from jsunit | ||
| - name: Set up npm 6 | ||
| run: npm i -g npm@^6 | ||
|
|
||
| - name: Test | ||
| run: ./autotest-js.sh | ||
|
|
||
| handlebars: | ||
| runs-on: ubuntu-latest | ||
| needs: versions | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up node ${{ needs.versions.outputs.nodeVersion }} | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: ${{ needs.versions.outputs.nodeVersion }} | ||
|
|
||
| - name: Set up npm ${{ needs.versions.outputs.npmVersion }} | ||
| run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run compile | ||
| run: ./build/compile-handlebars-templates.sh |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| # This workflow is provided via the organization template repository | ||
| # | ||
| # https://github.com/nextcloud/.github | ||
| # https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
|
|
||
| name: Node | ||
|
|
||
| on: | ||
|
|
@@ -9,71 +14,39 @@ on: | |
|
|
||
| jobs: | ||
| build: | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
|
|
||
| name: node | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies & build | ||
| run: | | ||
| make clean | ||
| npm ci | ||
| npm run build --if-present | ||
| - name: Check webpack build changes | ||
| run: | | ||
| bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )" | ||
| env: | ||
| CI: true | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
|
|
||
| test: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| npm ci | ||
| - name: Test | ||
| run: npm run test | ||
|
|
||
| jsunit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Test | ||
| run: ./autotest-js.sh | ||
| - name: Read package.json node and npm engines version | ||
| uses: skjnldsv/[email protected] | ||
| id: versions | ||
| with: | ||
| fallbackNode: '^12' | ||
| fallbackNpm: '^6' | ||
|
|
||
| handlebars: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Use node ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| - name: Set up node ${{ steps.versions.outputs.nodeVersion }} | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies | ||
| node-version: ${{ steps.versions.outputs.nodeVersion }} | ||
|
|
||
| - name: Set up npm ${{ steps.versions.outputs.npmVersion }} | ||
| run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" | ||
|
|
||
| - name: Install dependencies & build | ||
| run: | | ||
| npm ci | ||
| - name: Run compile | ||
| run: ./build/compile-handlebars-templates.sh | ||
| npm run build --if-present | ||
|
|
||
| - name: Check webpack build changes | ||
| run: | | ||
| bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1" | ||
|
|
||
| - name: Show changes on failure | ||
| if: failure() | ||
| run: | | ||
| git status | ||
| git --no-pager diff | ||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.