Skip to content

Commit

Permalink
Merge pull request #2377 from ing-bank/changeset-release/master
Browse files Browse the repository at this point in the history
Version Packages
  • Loading branch information
tlouisse committed Oct 17, 2024
2 parents a30dbf3 + ed1c951 commit e82d920
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 38 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-hotels-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'providence-analytics': patch
---

support `ignore: string[]` globs in optimisedGlob
5 changes: 0 additions & 5 deletions .changeset/green-chefs-live.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/old-walls-cover.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/perfect-jeans-search.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thick-pandas-exist-copy.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thick-pandas-exist.md

This file was deleted.

14 changes: 10 additions & 4 deletions packages-node/providence-analytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## 0.16.6

### Patch Changes

- a30dbf3: update dependencies

## 0.16.5

### Patch Changes
Expand Down Expand Up @@ -199,14 +205,14 @@
This means tag names are no longer being rewritten with a hash.

```js
import { css, LitElement } from "lit";
import { ScopedElementsMixin } from "@open-wc/scoped-elements";
import { MyButton } from "./MyButton.js";
import { css, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { MyButton } from './MyButton.js';

export class MyElement extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return {
"my-button": MyButton,
'my-button': MyButton,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages-node/providence-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "providence-analytics",
"version": "0.16.5",
"version": "0.16.6",
"description": "Providence is the 'All Seeing Eye' that measures effectivity and popularity of software. Release management will become highly efficient due to an accurate impact analysis of (breaking) changes",
"license": "MIT",
"author": "ing-bank",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,24 @@ export const parseGlobToRegex = memoize(
},
);

/**
* @template T
* @param {T|T[]} value
* @returns {T[]}
*/
function ensureArray(value) {

Check failure on line 117 in packages-node/providence-analytics/src/program/utils/optimised-glob.js

View workflow job for this annotation

GitHub Actions / Verify changes

'ensureArray' is defined but never used
return Array.isArray(value) ? value : [value];
}

/**
* @template T
* @param {T[]} arr
* @returns {T[]}
*/
function toUniqueArray(arr) {
return Array.from(new Set(arr));
}

const getStartPath = memoize(
/**
* @param {string} glob
Expand Down Expand Up @@ -209,6 +227,7 @@ export async function optimisedGlob(globOrGlobs, providedOptions = {}) {
unique: true,
sync: false,
dot: false,
ignore: [],
// TODO: ignore, throwErrorOnBrokenSymbolicLink, markDirectories, objectMode, onlyDirectories, onlyFiles, stats
// https://github.com/mrmlnc/fast-glob?tab=readme-ov-file
...providedOptions,
Expand All @@ -219,7 +238,12 @@ export async function optimisedGlob(globOrGlobs, providedOptions = {}) {
options.onlyDirectories = true;
}

const globs = Array.isArray(globOrGlobs) ? Array.from(new Set(globOrGlobs)) : [globOrGlobs];
const regularGlobs = Array.isArray(globOrGlobs) ? toUniqueArray(globOrGlobs) : [globOrGlobs];
const ignoreGlobs = options.ignore.map((/** @type {string} */ g) =>
g.startsWith('!') ? g : `!${g}`,
);

const globs = toUniqueArray([...regularGlobs, ...ignoreGlobs]);

/** @type {RegExp[]} */
const matchRegexesNegative = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,20 @@ describe('optimisedGlob', () => {
expect(files).to.deep.equal(['my/.hiddenFile.js']);
});

it('"ignore" filters out files" ', async () => {
const files = await runOptimisedGlobAndCheckGlobbyParity('**', {
...testCfg,
ignore: ['**/lvl1/**'],
});

expect(files).to.deep.equal([
'my/folder/some/anotherFile.d.ts',
'my/folder/some/anotherFile.js',
'my/folder/some/file.d.ts',
'my/folder/some/file.js',
]);
});

it.skip('"suppressErrors" throws errors when paths do not exist', async () => {
expect(async () =>
optimisedGlob('my/folder/**/some/file.js', {
Expand Down
24 changes: 18 additions & 6 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @lion/ui

## 0.8.0

### Minor Changes

- 27af6be: [combobox] change mimicUserTyping test helper function async and use sendKeys() internally

### Patch Changes

- 5530eef: fix(ui/calendar): use correct firstUpdated type signature
- dbb9640: [core] fix chromium detection
- 96b09e5: [accordion] make accordion closeable again

## 0.7.9

### Patch Changes
Expand Down Expand Up @@ -146,9 +158,9 @@ BREAKING:
For optimized bundling, it's reccommended to load feedback messages per entrypoint. For instance, when you only use form-core in your app:

```js
import { LionInputTel } from "@lion/ui/input-tel.js";
import { getLocalizeManager } from "@lion/ui/localize-no-side-effects.js";
import { loadInputTelMessagesNoSideEffects } from "@lion/ui/validate-messages-no-side-effects.js";
import { LionInputTel } from '@lion/ui/input-tel.js';
import { getLocalizeManager } from '@lion/ui/localize-no-side-effects.js';
import { loadInputTelMessagesNoSideEffects } from '@lion/ui/validate-messages-no-side-effects.js';

export class MyInputTel extends LionInputTel {
constructor() {
Expand Down Expand Up @@ -516,12 +528,12 @@ BREAKING:
Recommended approach is to do below at the top of your app (before lion code runs):

```js
import { singletonManager } from "singleton-manager";
import { LocalizeManager } from "@lion/ui/localize-no-side-effects.js";
import { singletonManager } from 'singleton-manager';
import { LocalizeManager } from '@lion/ui/localize-no-side-effects.js';
class MyLocalizeManager extends LocalizeManager {}
singletonManager.set("@lion/ui::localize::0.x", new MyLocalizeManager());
singletonManager.set('@lion/ui::localize::0.x', new MyLocalizeManager());
```

- de51dae2: Use the correct names for singleton registrations
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lion/ui",
"version": "0.7.9",
"version": "0.8.0",
"description": "A package of extendable web components",
"license": "MIT",
"author": "ing-bank",
Expand Down

0 comments on commit e82d920

Please sign in to comment.