Skip to content

Commit

Permalink
Move to new output API
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Mar 16, 2023
1 parent 21b30d7 commit 97b0f7c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions check-mdn-bcd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { writeFile } = require('fs')
const { writeFileSync } = require('fs')
const { get } = require('https')

const pkg = require('./package.json')
Expand Down Expand Up @@ -28,9 +28,9 @@ get('https://registry.npmjs.org/@mdn/browser-compat-data', res => {
pkg.devDependencies['@mdn/browser-compat-data'] !== lastVersion
) {
pkg.devDependencies['@mdn/browser-compat-data'] = lastVersion
writeFile('./package.json', `${JSON.stringify(pkg, null, 2)}\n`, () => {
process.stdout.write('::set-output name=newVersion::1\n')
})
writeFileSync('./package.json', `${JSON.stringify(pkg, null, 2)}\n`)
writeFileSync(process.env.GITHUB_OUTPUT, 'newVersion=1\n')
process.stdout.write('@mdn/browser-compat-data has new version\n')
} else {
process.stdout.write('Already up to date\n')
}
Expand Down
8 changes: 4 additions & 4 deletions check.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { writeFile } = require('fs')
const { writeFileSync } = require('fs')
const { get } = require('https')

const pkg = require('./package.json')
Expand All @@ -19,9 +19,9 @@ get('https://registry.npmjs.org/caniuse-db', res => {
if (pkg.devDependencies['caniuse-db'] !== lastVersion) {
pkg.version = lastVersion
pkg.devDependencies['caniuse-db'] = lastVersion
writeFile('./package.json', `${JSON.stringify(pkg, null, 2)}\n`, () => {
process.stdout.write('::set-output name=newVersion::1\n')
})
writeFileSync('./package.json', `${JSON.stringify(pkg, null, 2)}\n`)
writeFileSync(process.env.GITHUB_OUTPUT, 'newVersion=1\n')
process.stdout.write('caniuse-db has new version\n')
} else {
process.stdout.write('Already up to date\n')
}
Expand Down

0 comments on commit 97b0f7c

Please sign in to comment.