Skip to content

Commit

Permalink
Merge pull request #534 from tidev/splitTrim
Browse files Browse the repository at this point in the history
fix: handle spaces in deployType and platform
  • Loading branch information
cb1kenobi authored May 28, 2024
2 parents a49155c + 07fb030 commit e0adc29
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '18'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ 14, 16, 17 ]
node: [ 18, 20 ]
os: [ macos-latest, ubuntu-latest, windows-latest ]

steps:
Expand Down
4 changes: 2 additions & 2 deletions lib/timodule.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ function find(modulesOrParams, platforms, deployType, tiManifest, searchPaths, l

// make sure the module has a valid array of platforms
module.platform || (module.platform = params.platforms);
Array.isArray(module.platform) || (module.platform = module.platform.split(','));
Array.isArray(module.platform) || (module.platform = module.platform.split(',').map(str => str.trim()));
// align 'iphone'/'ipad'/'ios' => 'ios'
module.platform = Array.from(new Set(module.platform.map(p => platformAliases[p] || p)));

module.deployType || (module.deployType = params.deployType);
Array.isArray(module.deployType) || (module.deployType = module.deployType.split(','));
Array.isArray(module.deployType) || (module.deployType = module.deployType.split(',').map(str => str.trim()));

// if this module doesn't support any of the platforms we're building for, skip it
if (!module.deployType.includes(params.deployType)
Expand Down

0 comments on commit e0adc29

Please sign in to comment.