Skip to content

Commit

Permalink
Update ASAP to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanblock committed Jul 26, 2021
1 parent 84a6675 commit 8592485
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

---

## [2.0.3] 2021-07-25

### Changed

- Updated ASAP to v4

---

## [2.0.0 - 2.0.2] 2021-07-22

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@architect/asap": "~3.13.8",
"@architect/asap": "~4.0.0-RC.0",
"@architect/parser": "~4.0.0",
"@architect/utils": "~3.0.1"
},
Expand Down
6 changes: 3 additions & 3 deletions src/lib/asap-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ let { existsSync } = require('fs')

module.exports = function asapSrc () {
// Inventory running as an arc/arc dependency (most common use case)
let src = join(process.cwd(), 'node_modules', '@architect', 'asap', 'dist')
let src = join(process.cwd(), 'node_modules', '@architect', 'asap', 'src')
if (existsSync(src)) return src

// Inventory running in arc/arc as a global install
let global = join(__dirname, '..', '..', '..', 'asap', 'dist')
let global = join(__dirname, '..', '..', '..', 'asap', 'src')
if (existsSync(global)) return global

// Inventory running from a local (symlink) context (usually testing/dev)
let local = join(__dirname, '..', '..', 'node_modules', '@architect', 'asap', 'dist')
let local = join(__dirname, '..', '..', 'node_modules', '@architect', 'asap', 'src')
if (existsSync(local)) return local

try {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/src/lib/asap-src-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ test('Get ASAP', t => {
asapSrc()
}, 'Throw if unable to find ASAP module')

let localPath = join(cwd, 'node_modules', '@architect', 'asap', 'dist')
let localPath = join(cwd, 'node_modules', '@architect', 'asap', 'src')
mockFs({ [localPath]: 'ok' })
asap = asapSrc()
t.equal(asap, localPath, `Got ASAP module in local dev mode: ${asap}`)

process.chdir(cwd)
let globalPath = join(cwd, '..', 'asap', 'dist')
let globalPath = join(cwd, '..', 'asap', 'src')
mockFs({ [globalPath]: 'ok' })
asap = asapSrc()
t.equal(asap, globalPath, `Got ASAP module in global mode: ${asap}`)
Expand Down

0 comments on commit 8592485

Please sign in to comment.