Skip to content

Commit

Permalink
chore(npm): do not npmignore angular/dist + unlock npm (#805)
Browse files Browse the repository at this point in the history
https://coveord.atlassian.net/browse/CDX-1010

<!-- For Coveo Employees only. Fill this section.

CDX-1010

-->

## Proposed changes

I discussed with a developer from the npm team here
npm/npm-packlist#106 and got a good
understanding of their philosophy moving forward with the concept of
workspaces and their multi-level ignore files.

In short, npm will try to acquire an ignorefile at each directory level
and concatenate them. The peculiarity (at least IMO), is that if it
acquire a npmignore first, this will have no incidence for the
acquisition of the other ignorefile. So, we can end up with a mix of
`gitignore` and `npmignore`. I discussed this behavior with the npm
team, and they are kinda stuck, so its their least worst option here, so
we just have to adapt and make it work.

This is what this PR is about.

## Testing

 - Ran `npm publish --dry-run` on every package and checked them out.
 
 ## Prerequisites
 
 - [x] npm/npm-packlist#108
 - [ ] `npm-cli` released with ☝️
  • Loading branch information
louis-bompart committed Sep 13, 2022
1 parent 10dd82a commit c6f7888
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 26 deletions.
4 changes: 0 additions & 4 deletions .github/actions/e2e-clean/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ runs:
with:
node-version: 16
cache: 'npm'
- name: Install locked NPM version.
shell: bash
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0
- run: npm ci
shell: bash
- name: Decrypt config
Expand Down
4 changes: 0 additions & 4 deletions .github/actions/e2e-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ runs:
- name: Install Mitmproxy through pip
shell: bash
run: pip install -r packages/cli-e2e/mitmproxy/requirements.txt
- name: Install locked NPM version.
shell: bash
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0
- name: Decrypt config
shell: bash
working-directory: packages/cli-e2e
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ jobs:
with:
node-version: 16
cache: 'npm'
- name: Install locked NPM version.
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0

- name: Setup repo
run: npm ci
- name: Check linting
Expand Down Expand Up @@ -66,9 +64,6 @@ jobs:
with:
node-version: ${{matrix.node}}
cache: 'npm'
- name: Install locked NPM version.
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0
- name: Setup repo
run: npm ci
- name: Build
Expand All @@ -89,9 +84,6 @@ jobs:
with:
node-version: ${{matrix.node}}
cache: 'npm'
- name: Install locked NPM version.
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0
- uses: ./.github/actions/e2e-login
id: setup
e2e-setup-verdaccio:
Expand Down Expand Up @@ -126,9 +118,6 @@ jobs:
with:
path: packages\cli-e2e\verdaccio
key: verdaccio-${{matrix.os}}-${{ github.sha }}-${{ github.run_attempt }}
- name: Install locked NPM version.
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0
- run: npm ci
- name: Build
run: npm run build
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/daily-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ jobs:
with:
node-version: ${{matrix.node}}
cache: 'npm'
- name: Install locked NPM version.
# TODO: CDX-1010 | Remove in CDX-1010.
run: npm i -g npm@8.10.0

- name: Install Coveo CLI
run: npm i -g @coveo/cli@latest
- uses: ./.github/actions/e2e-login
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ jobs:
with:
node-version: '16'
registry-url: 'https://registry.npmjs.org'
# TODO: CDX-1010 | Remove in CDX-1010.
- run: npm i -g npm@8.10.0
- name: Install dependencies
run: npm ci
- name: Setup credentials
Expand Down
2 changes: 2 additions & 0 deletions packages/angular/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Ignores TypeScript files, but keeps definitions.
!*.d.ts
# Do not ignore dist.
!dist
2 changes: 1 addition & 1 deletion packages/cli/core/src/lib/flags/platformCommonFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
export const withRegion = (withDefault = true) => ({
region: Flags.string({
char: 'r',
options: Object.entries(Region).flatMap(regionEntry=>regionEntry),
options: Object.entries(Region).flatMap((regionEntry) => regionEntry),
parse: (input) => Promise.resolve(input.toLowerCase()),
default: withDefault ? DEFAULT_REGION : undefined,
description:
Expand Down

0 comments on commit c6f7888

Please sign in to comment.