Skip to content

Commit

Permalink
Merge pull request #986 from kethinov/0.19.5
Browse files Browse the repository at this point in the history
0.19.5
  • Loading branch information
kethinov authored Nov 14, 2020
2 parents e038629 + f4c5704 commit 95dbdd2
Show file tree
Hide file tree
Showing 7 changed files with 13,451 additions and 1,482 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x, 14.x]
node-version: [14.x, 15.x]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

- Put your changes here...

## 0.19.5

- Fix for Node 15 / npm 7 regression. Config auditor and deprecation checker will no longer run as postinstall scripts to compensate for INIT_CWD being removed from npm. These checks will be run exclusively on application first run instead (or any time the public folder is removed). (Closes https://github.com/rooseveltframework/roosevelt/issues/975)
- Dropped Node 12 support.
- Various dependencies updated.

## 0.19.4

- Fixed bug that caused Roosevelt to not listen to `NODE_ENV`.
Expand Down
6 changes: 1 addition & 5 deletions lib/scripts/configAuditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,8 @@ function configAudit (appDir) {
let errors
let processEnv
if (!appDir) {
if (process.env.INIT_CWD === process.cwd()) {
processEnv = process.env.INIT_CWD
} else if (fs.existsSync(path.join(process.cwd(), 'node_modules')) === false) {
if (fs.existsSync(path.join(process.cwd(), 'node_modules')) === false) {
processEnv = process.cwd()
} else if (fs.existsSync(path.join(process.env.INIT_CWD, 'node_modules')) === true) {
processEnv = process.env.INIT_CWD
} else {
processEnv = undefined
}
Expand Down
14 changes: 11 additions & 3 deletions lib/scripts/deprecationCheck.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
(function () {
module.exports = function (appDir) {
const Logger = require('roosevelt-logger')
const logger = new Logger()
const path = require('path')
const fs = require('fs')

try {
const { dependencies } = require(path.join(process.env.INIT_CWD, 'package.json'))
if (!appDir) {
if (fs.existsSync(path.join(process.cwd(), 'node_modules')) === false) {
appDir = process.cwd()
} else {
return
}
}
const { dependencies } = require(path.join(appDir, 'package.json'))

if (dependencies['roosevelt-less']) {
logger.warn('Deprecated module roosevelt-less detected. The functionality it offered is now provided direcly by the less module. See https://github.com/rooseveltframework/roosevelt#configure-your-app-with-parameters for information on how to update your configuration.'.bold.red)
Expand All @@ -22,4 +30,4 @@
logger.warn('Deprecated module roosevelt-uglify detected. The functionality it offered is now provided by Roosevelt via webpack. See https://github.com/rooseveltframework/roosevelt#configure-your-app-with-parameters for information on how to update your configuration.'.bold.red)
}
} catch {}
})()
}
Loading

0 comments on commit 95dbdd2

Please sign in to comment.