Skip to content

Commit

Permalink
Updated project dependencies (#105)
Browse files Browse the repository at this point in the history
* breaking: Set minimum Node version to 18. Updated CI and release strategy.

* chore: Updated dependencies

* chore: Added lockfile

* chore: Updated project configurations

* chore: Skipped embroider-optimized

* chore: Added changeset

---------

Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
  • Loading branch information
ijlee2 and ijlee2 authored Jul 10, 2024
1 parent 136c887 commit 9eb0dcd
Show file tree
Hide file tree
Showing 43 changed files with 11,533 additions and 13,897 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "./format-changelogs.cjs",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
43 changes: 43 additions & 0 deletions .changeset/format-changelogs.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const { getInfo } = require('@changesets/get-github-info');

const repo = 'ember-intl/cp-validations';

async function extractInformation(changeset) {
const { links: info } = await getInfo({
commit: changeset.commit,
repo,
});

const contributor = info.user ? `(${info.user})` : undefined;
const link = info.pull ?? info.commit ?? undefined;
const summary = (changeset.summary ?? '').split('\n')[0].trim();

return {
contributor,
link,
summary,
};
}

function getDependencyReleaseLine() {
return '';
}

async function getReleaseLine(changeset) {
try {
const { contributor, link, summary } = await extractInformation(changeset);

const line = [link, summary, contributor].filter(Boolean).join(' ');

return `- ${line}`;
} catch (error) {
console.error(`ERROR: getReleaseLine (${error.message})`);

return '';
}
}

module.exports = {
getDependencyReleaseLine,
getReleaseLine,
};
5 changes: 5 additions & 0 deletions .changeset/gorgeous-wolves-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ember-intl/cp-validations": major
---

Updated project dependencies
12 changes: 2 additions & 10 deletions .ember-cli
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
{
/**
Ember CLI sends analytics information by default. The data is completely
anonymous, but there are times when you might want to disable this behavior.

Setting `disableAnalytics` to true will prevent any data from being sent.
*/
"disableAnalytics": false,

/**
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
Setting `isTypeScriptProject` to true will force the blueprint generators to generate TypeScript
rather than JavaScript by default, when a TypeScript version of a given blueprint is available.
*/
"isTypeScriptProject": false
}
13 changes: 1 addition & 12 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
# unconventional js
/blueprints/*/files/
/vendor/

# compiled output
/declarations/
/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/

# misc
/coverage/
!.*
.*/
.eslintcache

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
63 changes: 48 additions & 15 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,68 @@

module.exports = {
root: true,
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
requireConfigFile: false,
babelOptions: {
plugins: [
[
'@babel/plugin-proposal-decorators',
{
decoratorsBeforeExport: true,
},
],
],
},
},
plugins: ['ember'],
plugins: ['ember', 'simple-import-sort'],
extends: [
'eslint:recommended',
'plugin:ember/recommended',
'plugin:import/recommended',
'plugin:prettier/recommended',
],
env: {
browser: true,
},
rules: {},
rules: {
curly: 'error',
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': 'error',
},
settings: {
'import/resolver': {
node: {
extensions: ['.gjs', '.js'],
},
},
},
overrides: [
// node files
// Ember files
{
files: ['**/*.gjs'],
parser: 'ember-eslint-parser',
extends: ['plugin:ember/recommended-gjs'],
},
{
files: ['**/*.{gjs,js}'],
rules: {
'import/no-duplicates': 'error',
'import/no-named-as-default-member': 'off',
'import/no-unresolved': [
'error',
{ ignore: ['^@ember', '^dummy/', '^ember', 'fetch', 'qunit-dom'] },
],
},
},
// Node files
{
files: [
'./.eslintrc.js',
'./.prettierrc.js',
'./.stylelintrc.js',
'./.template-lintrc.js',
'./ember-cli-build.js',
'./index.js',
Expand All @@ -34,21 +72,16 @@ module.exports = {
'./config/**/*.js',
'./tests/dummy/config/**/*.js',
],
parserOptions: {
sourceType: 'script',
},
env: {
browser: false,
node: true,
},
plugins: ['node'],
extends: ['plugin:node/recommended'],
extends: ['plugin:n/recommended'],
},
// Test files
{
// test files
files: ['tests/**/*-test.{js,ts}'],
files: ['tests/**/*-test.{gjs,js}'],
extends: ['plugin:qunit/recommended'],
rules: {},
},
],
};
131 changes: 76 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,96 @@ on:
push:
branches:
- main
pull_request: {}
pull_request:

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 18

jobs:
test:
name: "Tests"
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10

timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- name: Check out a copy of the repo
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
version: latest

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: yarn lint
- name: Run Tests
run: yarn test:ember
run: pnpm lint

floating:
name: "Floating Dependencies"
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10

timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Check out a copy of the repo
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --no-lockfile
- name: Run Tests
run: yarn test:ember

try-scenarios:
name: ${{ matrix.try-scenario }}
runs-on: ubuntu-latest
needs: "test"
timeout-minutes: 10
version: latest

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test
run: pnpm test

test-compatibility:
name: Test compatibility
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
try-scenario:
- ember-lts-3.28
- ember-4.0
- ember-lts-4.4
- ember-release
- ember-beta
- ember-canary
- embroider-safe
# - embroider-optimized

scenario:
- 'ember-lts-3.28'
- 'ember-lts-4.12'
- 'ember-lts-5.4'
- 'ember-lts-5.8'
- 'ember-release'
- 'ember-beta'
- 'ember-canary'
- 'embroider-safe'
# - 'embroider-optimized'
timeout-minutes: 7
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
- name: Check out a copy of the repo
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v3
with:
version: latest

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}
cache: 'pnpm'
node-version: ${{ env.NODE_VERSION }}

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Test
run: pnpm test:ember-compatibility ${{ matrix.scenario }} --- pnpm test
9 changes: 1 addition & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist/
/tmp/
/declarations/

# dependencies
/bower_components/
/node_modules/

# misc
/.env*
/.pnp*
/.sass-cache
/.eslintcache
/connect.lock
/coverage/
/libpeerconnection.log
/npm-debug.log*
/testem.log
/yarn-error.log

# ember-try
/.node_modules.ember-try/
/bower.json.ember-try
/npm-shrinkwrap.json.ember-try
/package.json.ember-try
/package-lock.json.ember-try
Expand Down
Loading

0 comments on commit 9eb0dcd

Please sign in to comment.