@architect/inventory 3.4.3-RC.1 → 3.4.4-RC.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@architect/inventory",
3
- "version": "3.4.3-RC.1",
3
+ "version": "3.4.4-RC.0",
4
4
  "description": "Architect project resource enumeration utility",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -23,8 +23,8 @@
23
23
  "dependencies": {
24
24
  "@architect/asap": "~5.1.1",
25
25
  "@architect/parser": "~6.0.2",
26
- "@architect/utils": "~3.1.2",
27
- "lambda-runtimes": "~1.1.3"
26
+ "@architect/utils": "~3.1.6",
27
+ "lambda-runtimes": "~1.1.4"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@architect/eslint-config": "~2.1.1",
@@ -32,7 +32,7 @@
32
32
  "aws-sdk-mock": "~5.8.0",
33
33
  "cross-env": "~7.0.3",
34
34
  "dotenv": "~16.0.3",
35
- "eslint": "~8.32.0",
35
+ "eslint": "~8.37.0",
36
36
  "mock-fs": "~5.2.0",
37
37
  "nyc": "~15.1.0",
38
38
  "tap-spec": "^5.0.0",
@@ -45,36 +45,31 @@ let denoHandlers = [ 'mod.ts', 'mod.js' ]
45
45
  function getExt ({ runtime, src, errors }) {
46
46
  try {
47
47
  if (runtime.startsWith('node')) {
48
- if (runtime === 'nodejs12.x') {
49
- return { ext: 'js', handlerModuleSystem: 'cjs' }
50
- }
51
48
  // This presumes Node.js ≥14 Lambda releases use the same CJS/ESM pattern
52
49
  // Generally in Lambda: CJS wins, but in Architect-land we attempt to default to ESM
53
- else {
54
- let { file, ext } = findHandler(nodeHandlers, src)
50
+ let { file, ext } = findHandler(nodeHandlers, src)
55
51
 
56
- // Early return on extensions that imply module type
57
- if (ext === 'mjs') return { file, ext, handlerModuleSystem: 'esm' }
58
- if (ext === 'cjs') return { file, ext, handlerModuleSystem: 'cjs' }
52
+ // Early return on extensions that imply module type
53
+ if (ext === 'mjs') return { file, ext, handlerModuleSystem: 'esm' }
54
+ if (ext === 'cjs') return { file, ext, handlerModuleSystem: 'cjs' }
59
55
 
60
- // In the odd case that there only exists an `index` file (no ext), default to ESM and let other things blow up when it's not found
61
- ext = ext || 'mjs'
62
- let handlerModuleSystem = ext === 'mjs' ? 'esm' : 'cjs'
56
+ // In the odd case that there only exists an `index` file (no ext), default to ESM and let other things blow up when it's not found
57
+ ext = ext || 'mjs'
58
+ let handlerModuleSystem = ext === 'mjs' ? 'esm' : 'cjs'
63
59
 
64
- let pkgFile = join(src, 'package.json')
65
- if (existsSync(pkgFile)) {
66
- let pkg = JSON.parse(readFileSync(pkgFile))
60
+ let pkgFile = join(src, 'package.json')
61
+ if (existsSync(pkgFile)) {
62
+ let pkg = JSON.parse(readFileSync(pkgFile))
67
63
 
68
- /**/ if (pkg?.type === 'module') handlerModuleSystem = 'esm'
69
- else if (pkg?.type === 'commonjs') handlerModuleSystem = 'cjs'
70
- else if (pkg?.type) throw Error(`Invalid 'type' field: ${pkg.type}`)
71
- else handlerModuleSystem = 'cjs' // Lambda's default, not ours
64
+ /**/ if (pkg?.type === 'module') handlerModuleSystem = 'esm'
65
+ else if (pkg?.type === 'commonjs') handlerModuleSystem = 'cjs'
66
+ else if (pkg?.type) throw Error(`Invalid 'type' field: ${pkg.type}`)
67
+ else handlerModuleSystem = 'cjs' // Lambda's default, not ours
72
68
 
73
- // We always get to make this a .js file, even if it's ESM!
74
- ext = 'js'
75
- }
76
- return { file, ext, handlerModuleSystem }
69
+ // We always get to make this a .js file, even if it's ESM!
70
+ ext = 'js'
77
71
  }
72
+ return { file, ext, handlerModuleSystem }
78
73
  }
79
74
  if (runtime.startsWith('python')) return { ext: 'py' }
80
75
  if (runtime.startsWith('ruby')) return { ext: 'rb' }