1
0
mirror of https://github.com/simple-icons/simple-icons.git synced 2024-11-16 00:59:07 +02:00

Drop package-lock.json (#6179)

* Drop `package-lock.json`

* Drop lockfile related code

* Drop lockfile maintenance configurations
This commit is contained in:
LitoMore 2021-08-24 01:21:03 +08:00 committed by GitHub
parent 20f2a1ef4e
commit 8283daf05a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 32 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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"],

View File

@ -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:

View File

@ -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

1
.npmrc Normal file
View File

@ -0,0 +1 @@
package-lock=false

View File

@ -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);