Skip to content

Commit

Permalink
feat: change Alexa Hosted skill runtime to Node.js 12 (#402)
Browse files Browse the repository at this point in the history
* fix: Change Alexa Hosted Skill runtime to Node.js 12

* fix: linter fix to avoid adding .js in the import statements

* fix: resolve integration test for newly added commands

Co-authored-by: Ron Wang <[email protected]>
  • Loading branch information
harimp-amzn and RonWang authored Jul 23, 2021
1 parent 61b3c0b commit 831d7e1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/commands/smapi/appended-commands/export-package/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ const jsonView = require('@src/view/json-view');
const Messenger = require('@src/view/messenger');
const optionModel = require('@src/commands/option-model');
const profileHelper = require('@src/utils/profile-helper');
const SmapiClient = require('@src/clients/smapi-client/index.js');
const SmapiClient = require('@src/clients/smapi-client/index');
const zipUtils = require('@src/utils/zip-utils');

const helper = require('./helper.js');
const helper = require('./helper');

class ExportPackageCommand extends AbstractCommand {
name() {
Expand Down
2 changes: 1 addition & 1 deletion lib/controllers/hosted-skill-controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const jsonView = require('@src/view/json-view');
const Messenger = require('@src/view/messenger');

const cloneFlow = require('./clone-flow');
const helper = require('./helper.js');
const helper = require('./helper');

module.exports = class HostedSkillController {
constructor(configuration) {
Expand Down
2 changes: 1 addition & 1 deletion lib/controllers/skill-metadata-controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const path = require('path');

const retryUtils = require('@src/utils/retry-utility');
const ResourcesConfig = require('@src/model/resources-config');
const SmapiClient = require('@src/clients/smapi-client/index.js');
const SmapiClient = require('@src/clients/smapi-client/index');
const httpClient = require('@src/clients/http-client');
const Manifest = require('@src/model/manifest');
const Messenger = require('@src/view/messenger');
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports.HOSTED_SKILL = {
'eu-west-1': 'EU_WEST_1'
},
DEFAULT_RUNTIME: {
NodeJS: 'NODE_10_X',
NodeJS: 'NODE_12_X',
Python: 'PYTHON_3_7',
},
SIGNIN_PATH: '/ap/signin',
Expand Down
4 changes: 2 additions & 2 deletions test/integration/commands/smapi-commands-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ parallel('smapi command test', () => {
});

it('| should get alexa hosted skill user permissions', async () => {
const args = [subCmd, 'get-alexa-hosted-skill-user-permissions', '--permission', 'somePermission'];
const args = [subCmd, 'get-alexa-hosted-skill-user-permissions', '--hosted-skill-permission-type', 'somePermission'];
addCoveredCommand(args);
const result = await run(cmd, args, options);
expect(result).be.an('object');
Expand Down Expand Up @@ -631,7 +631,7 @@ parallel('smapi command test', () => {
});

it('| should create interaction model catalog version', async () => {
const args = [subCmd, 'create-interaction-model-catalog-version', '-c', catalogId, '--description', 'someDescription'];
const args = [subCmd, 'create-interaction-model-catalog-version', '-c', catalogId, '--source-type', 'catalogType', '--source-url', 'catalogUrl', '--description', 'someDescription'];
addCoveredCommand(args);
const result = await run(cmd, args, { ...options, parse: false });
expect(result).include('Command executed successfully!');
Expand Down
4 changes: 2 additions & 2 deletions test/integration/fixtures/skill-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
},
"apis":{
"custom":{

}
}
},
"hosting":{
"alexaHosted":{
"runtime":"NODE_10_X"
"runtime":"NODE_12_X"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = (smapiClient) => {
const TEST_PROFILE = 'testProfile';
const TEST_ACCESS_TOKEN = 'access_token';
const TEST_RUNTIME_FIELD = 'NodeJS';
const TEST_RUNTIME_VALUE = 'NODE_10_X';
const TEST_RUNTIME_VALUE = 'NODE_12_X';
const TEST_REGION_VALUE = 'US_EAST_1';
const TEST_MANIFEST = {
runtime: TEST_RUNTIME_FIELD,
Expand Down

0 comments on commit 831d7e1

Please sign in to comment.