diff --git a/.gitattributes b/.gitattributes index 2714ea0c1..8f884e86e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,7 +4,6 @@ *.svg text # Don't diff machine generated files -package-lock.json -diff slugs.md -diff # Don't export/archive these files diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 577c6f3c5..72ef2bc08 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -6,19 +6,6 @@ "group:all", ], - lockFileMaintenance: { - extends: [ - // Make sure we get a single PR combining all updates - "group:all", - ], - - // Explicitly enable lockfile maintenance - enabled: true, - - // This schedule should be the same as the general schedule! - schedule: "on the 2nd and 4th day instance on sunday after 11pm", - }, - // Use our labelling system labels: ["dependencies"], diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c241fb324..089d3da07 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,19 +19,19 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node- - name: Cache Jest uses: actions/cache@v2 with: path: .cache/jest - key: ${{ runner.os }}-jest-${{ hashFiles('package-lock.json') }}-${{ github.run_number }} + key: ${{ runner.os }}-jest-${{ hashFiles('package.json') }}-${{ github.run_number }} restore-keys: | - ${{ runner.os }}-jest-${{ hashFiles('package-lock.json') }}- + ${{ runner.os }}-jest-${{ hashFiles('package.json') }}- ${{ runner.os }}-jest- - name: Install dependencies - run: npm ci + run: npm i - name: Build NodeJS package run: npm run build - name: Run linters @@ -53,11 +53,11 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: npm ci + run: npm i - name: Deploy to NPM uses: JS-DevTools/npm-publish@v1 with: diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 701f8e410..3cfc387ad 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -16,11 +16,11 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: npm ci + run: npm i - name: Build NodeJS package run: npm run build lint: @@ -37,11 +37,11 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: npm ci + run: npm i - name: Run linter run: npm run lint - name: Verify file permissions @@ -76,18 +76,18 @@ jobs: uses: actions/cache@v2 with: path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }} restore-keys: | ${{ runner.os }}-node- - name: Cache Jest uses: actions/cache@v2 with: path: .cache/jest - key: ${{ runner.os }}-jest-${{ hashFiles('package-lock.json') }}-${{ github.run_number }} + key: ${{ runner.os }}-jest-${{ hashFiles('package.json') }}-${{ github.run_number }} restore-keys: | - ${{ runner.os }}-jest-${{ hashFiles('package-lock.json') }}- + ${{ runner.os }}-jest-${{ hashFiles('package.json') }}- ${{ runner.os }}-jest- - name: Install dependencies - run: npm ci + run: npm i - name: Run tests run: npm run test diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..43c97e719 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/scripts/release/bump-version.js b/scripts/release/bump-version.js index 90c16cab2..9648a833a 100644 --- a/scripts/release/bump-version.js +++ b/scripts/release/bump-version.js @@ -9,7 +9,6 @@ const path = require("path"); const rootDir = path.resolve(__dirname, "..", ".."); const packageJsonFile = path.resolve(rootDir, "package.json"); -const packageLockFile = path.resolve(rootDir, "package-lock.json"); function readManifest(file) { const manifestRaw = fs.readFileSync(file).toString(); @@ -25,13 +24,10 @@ function writeManifest(file, json) { function main(newVersion) { try { const manifest = readManifest(packageJsonFile); - const manifestLock = readManifest(packageLockFile); manifest.version = newVersion - manifestLock.version = newVersion writeManifest(packageJsonFile, manifest); - writeManifest(packageLockFile, manifestLock); } catch (error) { console.error(`Failed to bump package version to ${newVersion}:`, error); process.exit(1);