Question: I am trying to import an array of objects from another JS file into a Vue component and let it render a card based on the object's properties. The import is working as I've logged it in the console and its returned the array, but when I try to assign it to an already existing array it throws `TypeError: Cannot set property 'products' of undefined`. Also, `console.log(this.products)` returns nothing but also doesn't throw an error. Below is my Products.vue component

```
<template>
<div>
    <header>
        <h1> Products </h1>
        <br>
        <h3> Browse All Our Products </h3>
    </header>
    <section>
        <div v-for='item in products' v-bind:key='item.name' class="product">
            <h3>{{ item.name }}</h3>
            <div>
            <img :src="item.img" />
            </div>
            <p>{{ item.desc }}</p>
            <p>{{ item.modelNum }}</p>
        </div>
    </section>
</div>
</template>

<style scoped src='../assets/products.css'></style>

<script>
    import { productList } from '../assets/db.js';

    export default {
    name: 'Products',
    data: function() {
        return {
            products: [],
            importList: productList,
        };
    },
    created: () => {
        this.products = productList;
        //console.log(products);
    }
}
</script>

```

Answer: 
A nice fully-fledged solution for this is **[semantic-release](https://github.com/semantic-release/semantic-release)**.

When using semantic-release, your commit messages need to adhere to [a specific format](https://semantic-release.gitbook.io/semantic-release/#commit-message-format). You will then configure your travis pipeline to run semantic-release, which parses your commits, generates a changelog, a new version number, and pushes the changes as a new commit (for the changelog) and a new tag to your repo.

The setup is a little more involved, but you will have a stable solution which ensures your version numbers make sense. Also, you get "free" automatically generated changelogs.

There is also [a recipe for travis](https://semantic-release.gitbook.io/semantic-release/recipes/recipes/travis) which should help to get it set up.
Setting a dependency version is a manual runtime or programming language task, Travis is CI & CD tool , you SHOULD NOT automated with travis. 

You might need a tool to inspect packages, dependencies like [Snyk](https://snyk.io/) so it might check vulnerabilities or posible upgradable packages.

Anyway under your own risk you could upgrade your packages in before\_install like this:

```
language: node_js
node_js:
  - "node"
before_install:
  - "npm update <package name>"  ## change your package to update.
install:
  - "npm install"
script:
  - "npm run test"
before_deploy: 

deploy:
  provider: npm
  email: "$npm_email"
  api_key: "$npm_token"
  on:
    branch: production

```